css div content vertical align center code example
Example 1: css align items vertical center
.parent {
display: flex;
justify-content: center;
align-items: center;
}
Example 2: css center vertically
/* 100vh = 100% Viewport Height */
body {
display: flex;
height: 100vh;
flex-direction: column;
justify-content: center;
}
/* add */ align-items: center; /*to also center horizontally.*/