Using Flexbox for Vertical Centering in CSS


Center content vertically in a container with Flexbox.

Source Code

.vertical-center {
    display: flex;
    align-items: center;
    height: 100vh;
}
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments