VOOZH about

URL: https://www.geeksforgeeks.org/bootstrap/bootstrap-5-overflow/

⇱ Bootstrap 5 Overflow - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Bootstrap 5 Overflow

Last Updated : 6 Aug, 2024

Bootstrap 5 Overflow provides utility classes to manage overflow behavior within elements. Options include auto, hidden, visible, and scroll, allowing control over content display in constrained spaces, ensuring a better user experience and layout management.

Overflow Classes in Bootstrap:

Class NameDescription
overflow-autoAllows overflowing elements inside a div.
overflow-hiddenForbids overflow of elements within a div.
overflow-visibleAllows components inside the div to overflow.
overflow-scrollEnables overflow with the assistance of a scrollbar.

Syntax:

<div class="overflow-*">...</div>

Here, * will be the variable that could be replaced from the above-mentioned classes.

Examples of Bootstrap 5 Overflow

Example 1: Using .overflow-auto and .overflow-hidden classes in div.

Output:

Example 2: Using .overflow-visible and .overflow-scroll classes in  div.

Output:

Comment

Explore