0
0
Bootsrapmarkup~20 mins

Mixing column widths in Bootsrap - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Bootstrap Column Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
🧠 Conceptual
intermediate
2:00remaining
Understanding Bootstrap column width behavior
In Bootstrap's grid system, what happens if you mix fixed-width columns (like col-3) with auto-width columns (like col) inside the same row?
AAuto-width columns shrink to zero width and are not visible.
BAll columns become fixed width based on the largest fixed-width column.
CThe fixed-width columns keep their size, and the auto-width columns share the remaining space equally.
DThe row breaks into multiple lines to fit all columns.
Attempts:
2 left
💡 Hint
Think about how Bootstrap distributes space when some columns have fixed sizes and others don't.
📝 Syntax
intermediate
2:00remaining
Correct Bootstrap column class usage
Which option correctly creates a row with three columns where the first column is 4 units wide, the second column auto-adjusts, and the third column is 3 units wide?
Bootsrap
<div class="row">
  <!-- columns here -->
</div>
A<div class="col-3"></div><div class="col-4"></div><div class="col"></div>
B<div class="col-4"></div><div class="col"></div><div class="col-3"></div>
C<div class="col"></div><div class="col-4"></div><div class="col-3"></div>
D<div class="col-4"></div><div class="col-3"></div><div class="col"></div>
Attempts:
2 left
💡 Hint
Remember the order: first column 4 units, second auto, third 3 units.
rendering
advanced
2:30remaining
Visual output of mixed column widths
What will you see in the browser when you use this Bootstrap code inside a container?
<div class="row">
  <div class="col-2 bg-primary text-white">A</div>
  <div class="col bg-success text-white">B</div>
  <div class="col-3 bg-danger text-white">C</div>
</div>
AA narrow blue box labeled 'A', a green box labeled 'B' filling leftover space, and a wider red box labeled 'C'.
BThree equal boxes labeled A, B, and C with equal widths and colors blue, green, and red.
CBoxes A and C stacked vertically with B filling the full width below them.
DOnly boxes A and C appear side by side; box B is hidden.
Attempts:
2 left
💡 Hint
Look at the column classes and their widths.
selector
advanced
2:00remaining
CSS selector for mixed Bootstrap columns
You want to style only the auto-width columns inside a Bootstrap row that also has fixed-width columns. Which CSS selector targets only the auto-width columns (with class col) inside a .row?
A.row > div:not(.col)
B.row > .col:not([class*='col-'])
C.row > [class^='col-']
D.row > .col
Attempts:
2 left
💡 Hint
Remember that auto-width columns have the class exactly 'col'.
accessibility
expert
3:00remaining
Ensuring accessibility with mixed column widths
You have a Bootstrap row with mixed column widths. What is the best practice to ensure screen readers understand the layout and content order correctly?
AUse semantic HTML elements inside columns and ensure logical DOM order matches visual order.
BAdd <code>aria-hidden="true"</code> to fixed-width columns to skip them.
CUse <code>tabindex="-1"</code> on auto-width columns to prevent keyboard focus.
DWrap all columns in a single <code>div</code> with <code>role="presentation"</code>.
Attempts:
2 left
💡 Hint
Think about how screen readers read content and the importance of semantic structure.