← Lessons

📐 Flex Layout

Lesson 8 of 20
🚀
Themed Universe
Space Command
Arrange your fleet with Flexbox!
🎯 Missions
Try 3 different flex directions!
Use space-between alignment!
Solve all 4 challenges!
📐 LIVE FLEX PLAYGROUND — tap the buttons below!
🛸 A
⭐ B
🪐 C
💫 D

🧭 Direction

🎯 Justify (main axis)

↕️ Align (cross axis)

🎯 Challenge: Set direction to "Column" — tap the button!

Step 1 of 4

📐 Flex Layout

In Lesson 7 you learned that every element is a box. Now let's arrange boxes side by side (or top to bottom) using Flexbox — the most powerful layout tool in CSS! 🚀

🧭flex-direction — which way do items go? Row (→) or Column (↓)?
🎯justify-content — how items are spaced along the main line.
↕️align-items — how items line up on the cross axis.
➡️Direction Arrow — watch the arrow show which way items flow!