Put in order · HTML and CSS course · Module 4: Flexbox
Steps for Vertical Centering
Arrange the steps for vertically centering elements using align-items:
Items to put in order
- 3. Add align-items with the desired value
- 2. Define the container height (e.g. height: 300px)
- 1. Set display: flex on the container
- 4. Check the effect on child elements
You can check the correct answer by solving this task in the CodeWorlds game.