0
0
Bootsrapmarkup~20 mins

Column stacking on mobile in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Bootstrap Column Stacking Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
1: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?
AColumns stay side by side with fixed widths regardless of screen size.
BColumns stack vertically, each taking full width on smaller screens.
CColumns disappear on smaller screens.
DColumns become hidden and replaced by a dropdown menu.
Attempts:
2 left
💡 Hint
Think about how Bootstrap's grid classes apply from the specified breakpoint and up.
📝 Syntax
intermediate
1: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?
Acol-lg-12 col-sm-6
Bcol-md-12 col-6
Ccol-6 col-md-12
Dcol-12 col-md-6
Attempts:
2 left
💡 Hint
Remember that col-12 applies to all screen sizes by default.
rendering
advanced
2:00remaining
What is the visual output of this Bootstrap grid code on a small screen?
Given the following HTML using Bootstrap 5:
<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?
AThree columns stacked vertically, each full width.
BThree columns side by side, each one-third width.
COnly the first column visible, others hidden.
DColumns overlap each other horizontally.
Attempts:
2 left
💡 Hint
Bootstrap columns with col-md-* stack vertically below the medium breakpoint.
selector
advanced
2: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?
A@media (max-width: 767.98px) { .row > [class*='col-'] { margin-bottom: 1rem; } }
B@media (min-width: 768px) { .row > .col-md-4 { margin-bottom: 1rem; } }
C.row > .col-md-4 { margin-bottom: 1rem; }
D@media (max-width: 991.98px) { .row > .col-lg-4 { margin-bottom: 1rem; } }
Attempts:
2 left
💡 Hint
Stacking happens below the medium breakpoint (768px).
accessibility
expert
2: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?
AAdd <code>aria-hidden="true"</code> to all stacked columns.
BUse CSS <code>order</code> property to rearrange columns visually without changing HTML order.
CKeep the HTML source order matching the visual order and avoid using CSS order properties.
DHide some columns on mobile to reduce clutter for screen readers.
Attempts:
2 left
💡 Hint
Screen readers read content in the order it appears in the HTML.