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 useful in web design?
Attempts:
2 left
💡 Hint
Think about how items can be arranged when their sizes change.
✗ Incorrect
Flexbox helps arrange items in a container by distributing space and aligning items easily, especially when sizes are dynamic or unknown.
📝 Syntax
intermediate1:30remaining
Flexbox container property
Which CSS property correctly makes an element a flex container?
Attempts:
2 left
💡 Hint
Look for the property that changes the display behavior of the container.
✗ Incorrect
The display: flex; property turns an element into a flex container, enabling flexbox layout for its children.
❓ layout
advanced2:00remaining
Flexbox alignment behavior
Given a flex container with
justify-content: space-between;, what will be the horizontal spacing between three child items?Attempts:
2 left
💡 Hint
Think about how space is distributed between items horizontally.
✗ Incorrect
justify-content: space-between; places the first item at the start, the last at the end, and evenly spaces the items in between horizontally.
❓ accessibility
advanced2:00remaining
Flexbox and keyboard navigation
How does using Flexbox affect keyboard navigation order of items in a container?
Attempts:
2 left
💡 Hint
Consider how screen readers and keyboard focus follow the HTML structure.
✗ Incorrect
Flexbox changes how items look on screen but does not change the order in the HTML code, so keyboard navigation follows the HTML order unless you use additional properties.
❓ selector
expert2:30remaining
Selecting flex items with CSS
Which CSS selector targets only the second flex item inside a flex container?
Attempts:
2 left
💡 Hint
Think about how to select the second child element inside a container.
✗ Incorrect
The selector .container > :nth-child(2) selects the second direct child of .container, which is the second flex item.