Challenge - 5 Problems
Flexbox Mastery
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate2:00remaining
Why use Flexbox for layout?
Which of the following best explains why Flexbox is essential for modern web layouts?
Attempts:
2 left
💡 Hint
Think about how items adjust inside a container when the screen size changes.
✗ Incorrect
Flexbox helps arrange items in a container so they can grow, shrink, and align nicely, making responsive design easier.
📝 Syntax
intermediate2:00remaining
Tailwind Flexbox Syntax
Which Tailwind CSS class correctly applies a flex container that arranges items in a row and centers them horizontally and vertically?
Attempts:
2 left
💡 Hint
Remember 'flex' starts flexbox, 'flex-row' sets direction, 'justify-center' aligns horizontally, 'items-center' aligns vertically.
✗ Incorrect
Option B sets a flex container with row direction and centers items both horizontally and vertically.
❓ layout
advanced2:00remaining
Flexbox Responsive Layout
Given this Tailwind code snippet, what will be the layout on a small screen (less than 640px wide)?
Item 1
Item 2
Item 3
Attempts:
2 left
💡 Hint
Look at the class names and how Tailwind applies styles for small screens.
✗ Incorrect
The flex-col class applies by default, stacking items vertically. The sm:flex-row applies only on screens 640px and wider.
❓ selector
advanced2:00remaining
Tailwind Flexbox Alignment Classes
Which Tailwind class aligns flex items to the end of the main axis in a flex container?
Attempts:
2 left
💡 Hint
Main axis alignment uses 'justify-' prefix in Tailwind.
✗ Incorrect
justify-end moves items to the end of the main axis (horizontal in flex-row).
❓ accessibility
expert3:00remaining
Accessible Flexbox Navigation
You have a horizontal navigation bar using Flexbox. Which practice improves keyboard accessibility for users navigating with the Tab key?
Attempts:
2 left
💡 Hint
Think about how keyboard users find and see where they are on the page.