Recall & Review
beginner
What is a horizontal collapse in Bootstrap?
A horizontal collapse is a UI feature where content expands or collapses sideways (left to right) instead of vertically. It helps save space and create interactive layouts.
Click to reveal answer
beginner
Which Bootstrap class controls horizontal collapse behavior?The class
.collapse-horizontal enables horizontal collapsing of content in Bootstrap.Click to reveal answer
intermediate
How do you trigger a horizontal collapse with a button in Bootstrap?
Use a button with
data-bs-toggle="collapse" and data-bs-target="#id" attributes. The target element should have collapse collapse-horizontal classes.Click to reveal answer
intermediate
What CSS property changes during a horizontal collapse animation?
The
width property changes from 0 to the element's full width during horizontal collapse animation.Click to reveal answer
beginner
Why use horizontal collapse instead of vertical collapse?
Horizontal collapse is useful when you want to hide or show side panels or menus without affecting vertical page flow, making layouts more dynamic and space-efficient.
Click to reveal answer
Which class enables horizontal collapse in Bootstrap?
✗ Incorrect
The correct class is
.collapse-horizontal to make the collapse horizontal.What CSS property animates during horizontal collapse?
✗ Incorrect
Horizontal collapse changes the
width property from 0 to full width.How do you connect a button to a horizontal collapse element?
✗ Incorrect
Bootstrap uses
data-bs-toggle="collapse" and data-bs-target="#id" to link buttons to collapse elements.What happens visually when a horizontal collapse is triggered?
✗ Incorrect
Horizontal collapse expands or shrinks content sideways (left to right).
Which Bootstrap version introduced horizontal collapse?
✗ Incorrect
Horizontal collapse was introduced in Bootstrap 5.
Explain how to create a horizontal collapse in Bootstrap and how it differs from a vertical collapse.
Think about the classes and attributes needed and the direction of animation.
You got /4 concepts.
Describe a real-life scenario where horizontal collapse is more useful than vertical collapse.
Consider layouts with side panels or menus.
You got /4 concepts.