Align Items
The align-items property aligns items along the cross axis.
stretch (Default)
Items stretch to fill the container:
All boxes stretch to the same height!
flex-start
Items align to the start of the cross axis:
flex-end
Items align to the end:
center
Items align to the center:
baseline
Items align by their text baseline:
Interactive Playground
Perfect Centering
Combine justify-content and align-items:
Practical: Icon with Text
Practical: Header Layout
align-self
Override alignment for a single item:
Exercise: Center Vertically
Center the content vertically in the container:
Up next · Lesson 19 of 27
Flex Item Properties
3 min read
18 of 27 lessons done

Ask Byte about this lesson
A private chat about this lesson. Byte has read the whole lesson, answers in seconds, and shows the section each answer comes from. Ask follow-ups in any language.
Questions & Answers
Public questions about this lesson. The AI Tutor answers right away in your language, the FreeAcademy team checks answers, and every learner can read them.

