Challenge - 5 Problems
Flex Direction Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:00remaining
Understanding flex-direction property
What is the default value of the
flex-direction property in a flex container?Attempts:
2 left
💡 Hint
Think about how items are laid out horizontally by default.
✗ Incorrect
The default flex-direction is
row, which arranges flex items horizontally from left to right.📝 Syntax
intermediate1:30remaining
CSS syntax for flex-direction
Which of the following CSS snippets correctly sets the flex container to arrange items vertically from top to bottom?
CSS
div.container { display: flex; /* flex-direction here */ }
Attempts:
2 left
💡 Hint
The property value should mean vertical stacking from top to bottom.
✗ Incorrect
The value
column arranges flex items vertically from top to bottom.❓ rendering
advanced2:00remaining
Visual output of flex-direction: row-reverse
Given the following HTML and CSS, what will be the order of the items displayed in the browser?
CSS
<style> .container { display: flex; flex-direction: row-reverse; gap: 1rem; } </style> <div class="container"> <div>Item 1</div> <div>Item 2</div> <div>Item 3</div> </div>
Attempts:
2 left
💡 Hint
row-reverse reverses the horizontal order of items.
✗ Incorrect
With flex-direction: row-reverse, items are laid out horizontally but in reverse order, so Item 3 appears first on the left.
❓ selector
advanced1:30remaining
Selecting flex container for vertical layout
Which CSS selector and property combination correctly targets a flex container with class
menu and sets its items vertically from bottom to top?Attempts:
2 left
💡 Hint
Look for the correct selector and the property value that reverses vertical order.
✗ Incorrect
The selector '.menu' targets elements with class 'menu'. The value 'column-reverse' arranges items vertically from bottom to top.
❓ accessibility
expert2:30remaining
Accessibility impact of flex-direction changes
When using
flex-direction: row-reverse; on a navigation menu, what accessibility consideration should you keep in mind?Attempts:
2 left
💡 Hint
Think about how assistive technologies read content compared to visual layout.
✗ Incorrect
Screen readers follow the HTML source order, so reversing visual order with flex-direction does not change reading order, which can confuse users.