0
0
Bootsrapmarkup~5 mins

Horizontal collapse in Bootsrap - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
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?
A.collapse-horizontal
B.collapse-vertical
C.horizontal-collapse
D.collapse-side
What CSS property animates during horizontal collapse?
Aheight
Bwidth
Copacity
Dmargin
How do you connect a button to a horizontal collapse element?
AUsing <code>href="#id"</code> only
BUsing <code>onclick="toggle()"</code>
CUsing <code>data-bs-toggle="collapse"</code> and <code>data-bs-target="#id"</code>
DUsing <code>data-toggle="horizontal"</code>
What happens visually when a horizontal collapse is triggered?
AContent expands or shrinks sideways
BContent fades in and out
CContent slides up and down
DContent rotates
Which Bootstrap version introduced horizontal collapse?
ABootstrap 3
BBootstrap 2
CBootstrap 4
DBootstrap 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.