Rectangle 27 0

html Twitter Bootstrap "container fluid"?


.container-fluid {
   max-width:1170px;
}
.maxWidth {
       max-width:1170px;
}
<div class="container-fluid maxWidth"></div>

If you are wanting the container to be fixed no matter what, that will make the contents inside non-responsive as they would not be able to tell when the screen has changed size as the container would not change size.

If you are wanting to make the container not go wider than 1170px use

Of course using .container-fluid as the selector will change how all container-fluid elements act so think about adding a second class to that element and setting the style to it.

max-width will make it so if the users screen is wider than 1170px the container will go only up to 1170px wide. This will make it so the responsive mechanisms will still work.

setting a px width is making it static, you would have to employ a different technique to make it responsive after that like javascript that is why a % is used.

Note