how to align content vertically center in a div code example
Example 1: center elements vertically in div
.container {
display: flex;
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.*/