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
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources

Copyright ©2025 Educative, Inc. All rights reserved