Challenge - 5 Problems
Bootstrap Column Stacking Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate1:30remaining
How does Bootstrap handle column stacking on small screens?
In Bootstrap, when you use the grid system with classes like
col-md-4, what happens to the columns on screens smaller than the md breakpoint?Attempts:
2 left
💡 Hint
Think about how Bootstrap's grid classes apply from the specified breakpoint and up.
✗ Incorrect
Bootstrap grid classes like
col-md-4 apply starting at the medium breakpoint (≥768px). Below that, columns stack vertically and take full width by default.📝 Syntax
intermediate1:30remaining
Identify the correct Bootstrap class for stacking columns on mobile
Which Bootstrap class ensures that columns stack vertically on mobile devices but display side by side on medium and larger screens?
Attempts:
2 left
💡 Hint
Remember that
col-12 applies to all screen sizes by default.✗ Incorrect
col-12 makes the column full width on extra small screens (mobile), and col-md-6 makes it half width on medium and larger screens.❓ rendering
advanced2:00remaining
What is the visual output of this Bootstrap grid code on a small screen?
Given the following HTML using Bootstrap 5:
What will the columns look like on a screen smaller than 768px wide?
<div class="container">
<div class="row">
<div class="col-md-4">Column 1</div>
<div class="col-md-4">Column 2</div>
<div class="col-md-4">Column 3</div>
</div>
</div>What will the columns look like on a screen smaller than 768px wide?
Attempts:
2 left
💡 Hint
Bootstrap columns with
col-md-* stack vertically below the medium breakpoint.✗ Incorrect
The
col-md-4 class applies from 768px and up. Below that, columns stack vertically and take full width by default.❓ selector
advanced2:00remaining
Which CSS selector targets stacked columns on mobile in Bootstrap?
You want to style Bootstrap columns only when they stack vertically on mobile devices (less than 768px). Which CSS selector combined with media queries correctly targets these stacked columns?
Attempts:
2 left
💡 Hint
Stacking happens below the medium breakpoint (768px).
✗ Incorrect
The selector targets any column class inside a row on screens smaller than 768px, where columns stack vertically. The other options target larger screens or specific classes without media queries.
❓ accessibility
expert2:30remaining
Ensuring accessible column stacking on mobile with Bootstrap
When Bootstrap columns stack vertically on mobile, what is the best practice to maintain logical reading order and accessibility for screen readers?
Attempts:
2 left
💡 Hint
Screen readers read content in the order it appears in the HTML.
✗ Incorrect
Maintaining the HTML source order consistent with visual order ensures screen readers read content logically. Using CSS order can confuse screen readers. Hiding content or using aria-hidden incorrectly reduces accessibility.