how to align items center in css no flex or grid code example

Example 1: css grid center elements inside div

article {
  display: inline-grid;
  grid-template-rows: 100px 100px 100px;
  grid-template-columns: 100px 100px 100px;
  grid-gap: 3px;
}

section {
  display: flex;
  justify-content: center;
  align-items: center;
  border: 2px solid black;
  font-size: 3em;
}

Example 2: align divs vertically start new column after every row

.column-container {
  column-width: 15rem; /* width of each column */
  column-gap: 1rem; /* increase gap between each column */
  width: 80%;
}

.column-container .column {
  margin-bottom: 1rem;
}

Tags:

Css Example