Flexbox Justify Content
Multiple Choice Easy
Question
What does justify-content: center do in a flex container?
Hint
justify-content works on the main axis, align-items on the cross axis.
Explanation
justify-content: center centers flex items along the main axis (horizontal for flex-direction: row, vertical for column). The cross axis alignment is controlled by align-items. This distinction between main and cross axes is fundamental to understanding Flexbox.
Related Resources
Related Lessons
- CSS Flexbox
Learn Flexbox layout.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.