Search⌘ K
AI Features

Solution: Vertical Centering with Flexbox

Explore how Flexbox's align-items property centers elements vertically within their container. This lesson helps you apply vertical centering techniques for responsive and well-aligned web layouts using clear, reusable CSS patterns.

We'll cover the following...

Solution explanation

In the styles.css file, on line 6 (align-items: center;), Flexbox aligns children along the cross axis (vertical), centering the .box within the container’s height.