What is Bootstrap container-fluid class?

The container-fluid class is one of the three types of container classes offered by Bootstrap.

Containers are the most basic layout element in Bootstrap. They are used to contain, pad, and center the content within them.

The container-fluid class is used for a full-width container and spans the entire width of the viewport.

Code

As an example, we have a div element with the container-fluid class. The children elements h1 and p are nicely padded inside the parent div.

This responsive container-fluid can be modified per display screen size.

  • HTML

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved