Search⌘ K
AI Features

Sizing and Overflow

Understand how to manipulate element size with Bootstrap 5 width and height utility classes, and control content overflow using different overflow classes. Learn practical ways to manage layout spacing and visibility to create responsive and well-structured web designs.

We'll cover the following...

We have three ways to manipulate the size of an element—by width, by height, or by a combination of both of them. Bootstrap provides us with some built-in classes so we can alter sizes with ease.

Width

The width of an element can be altered using the w class. The width class consists of four types:

  • .w-25: The element is constrained to use only 25% of its parent width.
  • .w-50: The element is constrained to use only 50% of its parent width.
  • .w-75: The element is constrained to use only 75% of its parent width.
...