Sizing and Overflow

Learn how to adjust sizing and manage overflow using Bootstrap.

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.
  • .w-100: The element is constrained to use 100% of its parent width.

Note: Every element inside the .row class has a width of 100% by default.

Let’s look at these classes in action.

Access this course and 1400+ top-rated courses and projects.