What are Containers in Bootstrap? How many types of containers are there in the Bootstrap?

0 votes
834 views
Ethan Karla asked 28-Jul-2021 in Web Application by Ethan Karla

What are Containers in Bootstrap? How many types of containers are there in the Bootstrap?

1 Answer

0 votes
Ravi Vishwakarma answered 07-Aug-2021 by Ravi Vishwakarma
In Bootstrap, the container is used to set the content margin with the responsive behavior of your page. This class is the main class of bootstrap for making the responsive page. The bootstrap has two types of containers.
  1. container
  2. container-fluid

The container class is the default layout in Bootstrap. This class has written some predefined margins. And there are 5 types of classes used in the container class. 

  1. container-sm  small breakpoint
  2. container-md medium breakpoint
  3. container-lg     large breakpoint
  4. container-xl     extra-large breakpoint 
  5. container-xxl    extra-extra-large breakpoint

Syntax 

<div class='container'>
    other tags 
</div>

The container-fluid class in the bootstrap is used for a full-width container, it takes the entire width of the viewport.

Syntax 

<div class='container-fluid'>

    other tags
</div>