css auto center div vertically code example
Example 1: css center
/* this will center all children within the parent element. */
.parent {
display: flex;
justify-content: center; /* horizontal */
align-items: center; /* vertical */
}
Example 2: vertical align css
.container{
display: table;
}
.div-inside-container{
display: table-cell;
vertical-align: middle;
}