Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fluid Container in Bootstrap 3

How to make fluid container in bootstrap 3?

In bootstrap 2.3.2 .container-fluid class is there. But now in bootstrap 3 it is missing and there is only .container class. Please help me.

like image 673
Hari Krishnan Avatar asked Nov 05 '13 13:11

Hari Krishnan


People also ask

What is fluid container in Bootstrap?

container-fluid: The . container-fluid class provides a full-width container which spans the entire width of the viewport. In the below example, the div with class “container-fluid” will take up the complete width of the viewport and will expand or shrink whenever the viewport is resized. HTML.

Can you put a container in a container Bootstrap?

Containers. Containers are the most basic layout element in Bootstrap and are required when using our default grid system. Containers are used to contain, pad, and (sometimes) center the content within them. While containers can be nested, most layouts do not require a nested container.

How do you make responsive container-fluid?

You can simply use the . container class to create a responsive, fixed-width container. The width of the container will change at different breakpoints or screen sizes, as shown above.

What is XS SM MD lg in Bootstrap?

The Bootstrap grid system has four classes: xs (for phones - screens less than 768px wide) sm (for tablets - screens equal to or greater than 768px wide) md (for small laptops - screens equal to or greater than 992px wide) lg (for laptops and desktops - screens equal to or greater than 1200px wide)


1 Answers

Bootstrap 3.0 moved to a "mobile first" approach. .container is really only there in instances where you need/want a boxy layout. but, if you exempt the div.container-fluid entirely, you're left with a fluid layout by default.

for example, to have a two-column fluid layout, simply use:

<body>   <header>...</header>   <div style="padding:0 15px;"><!-- offset row negative padding -->     <div class="row">       <div class="col-md-6">50%</div>       <div class="col-md-6">50%</div>     </div>   </div>   <footer>...</footer> </body> 
like image 65
Brad Christie Avatar answered Sep 20 '22 14:09

Brad Christie