Bootstrap Fluid Container

Bootstrap fluid container/Bootstrap container fluid spans the entire width of the viewport or screen. It takes 100% available width on every breakpoints and does not create any left and right margin.

Bootstrap Container Fluid Class :

.container-fluid: - This class is used to make full width Bootstrap container i.e. fluid container.

General Syntax

<div class="container-fluid">
    ...
</div>        

Source Code

<div class="container-fluid">
   <div class="alert alert-success mt-4" role="alert">
      <p class="text-center">Fluid Container - 100% Width At All Breakpoint</p>
   </div>
</div>        

Can you make fluid container for a specific breakpoint ? The answer is yes. You can make fluid container for a specific breakpoint through .container-{breakpoint} class. It covers 100% width until the specified breakpoint.

Bootstrap Responsive Container Classes

There are following types of responsive Bootstrap container classes.

  • container-sm: It specifies 100% width till the sm breakpoint i.e. 540px and above 540px, it takes max-width.
  • container-md: It specifies 100% width till the md breakpoint i.e. 720px and above 720px, it takes max-width.
  • container-lg: It specifies 100% width till the lg breakpoint i.e. 960px and above 960px, it takes max-width.
  • container-xl: It specifies 100% width till the xl breakpoint i.e. 1140px and above 1140px, it takes max-width.
  • container-xxl: It specifies 100% width till the xxl breakpoint i.e. 1320px and above 1320px, it takes max-width.

General Syntax

<div class="container-{breakpoint}"></div>        

Source Code

<div class="container-sm"></div>
<div class="container-fluid">
   <div class="alert alert-success mt-4" role="alert">
      <p class="text-center">Responsive Container - 100% Width Till the Specified Breakpoint & Then It Takes Max width For All Higher Breakpoints.</p>
   </div>
</div>        

If you want to learn more about Bootstrap fluid container, click here.

要查看或添加评论,请登录

Diwakar Chauhan的更多文章

  • Bootstrap Container Class

    Bootstrap Container Class

    In this tutorial, you will learn and understand the Bootstrap container class with the help of multiple examples…

  • Bootstrap Fixed Width Container

    Bootstrap Fixed Width Container

    Bootstrap containers are an essential element in the Bootstrap grid system. It plays an important role during grid…

  • Bootstrap Responsive Container

    Bootstrap Responsive Container

    Bootstrap responsive container covers 100% available width of the screen until the specified breakpoint, after which it…

  • Container in Bootstrap

    Container in Bootstrap

    The container in Bootstrap is used to set the padding around the content as well left and right margin to the content…

  • Bootstrap Containers

    Bootstrap Containers

    Bootstrap containers are the basic layout element in the Bootstrap grid system that is used to create empty space…

  • JSON Examples

    JSON Examples

    This section contains different JSON examples that belong to different JSON functions. Each function's feature has been…

  • HTML 5 Examples

    HTML 5 Examples

    This section consists of different HTML 5 examples that belong to different HTML 5 elements. Each element's feature has…

  • CSS 3 Examples

    CSS 3 Examples

    This section consists of different CSS 3 examples that belong to different CSS 3 components. Each component's feature…

  • Javascript Examples

    Javascript Examples

    This section consists of different Javascript examples that belong to different Javascript functions and features. JS…

  • jQuery Examples

    jQuery Examples

    This section contains different jQuery examples that belong to different jQuery functions. Each function's feature has…

社区洞察

其他会员也浏览了