What is use of the container-fluid Class in Bootstrap ?
The container-fluid
class in Bootstrap serves a crucial role in creating a full-width container that spans the entire viewport width. This class is especially useful when you want your content to extend seamlessly across the screen. It’s commonly employed for building responsive and fluid layouts.
Syntax:
<div class="container-fluid">
<!-- Your content goes here -->
</div>
Key Features:
- Full-Width Container: The
container-fluid
class ensures that the container spans the entire width of the viewport. - Responsive Design: It plays a pivotal role in achieving responsiveness, making your content adapt to various screen sizes.
- Fluid Grid System: Combining with Bootstrap’s grid system,
container-fluid
supports flexible and fluid layouts. - No Horizontal Padding: Unlike the standard
container
class,container-fluid
eliminates horizontal padding, offering a clean, edge-to-edge appearance.
Contact Us