Flexbox container
Turns an element into a flex container. Its direct children become flex items that can be arranged, aligned and spaced using flex properties.
What it does: display: flex on section makes it a flex container. flex-direction: column makes its children stack vertically. Without flex-wrap: wrap, items stay on one line and may overflow. wrap lets them break onto a new row or column. display: flex is the correct value. 'flexbox' is not valid — the property value is simply 'flex'. justify-content controls alignment along the main axis. align-items controls alignment along the cross axis. space-between puts equal gaps between items with none at the edges. space-around adds equal gaps on each side of each item, including at the edges. CSS property values use American English. 'centre' is British spelling and is not recognised. Use 'center'.
Common mistakes: CSS declarations require a colon. It should be display: flex; not display flex;. 'rows' is not a valid value. The correct value is flex-direction: row; (singular).
Free printable worksheet with full answer key — or add this module to a journey and assign it to your class.
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
display: flexFill in the Blanks
Spot the Error
Create a free class, add this module to a journey, and track who's stuck.
Create a free teacher account →No credit card. No setup fee. Make a class and invite students in under three minutes.
Practice this topic interactively, track progress, and unlock badges.
Start Learning Free →