twitter-bootstrap

Bootstrap Containers

Introduction#

Use .container for a responsive fixed width container.

Use .container-fluid for a full width container, spanning the entire width of the viewport.

Containers

.container has one fixed width for each screen size in bootstrap (xs,sm,md,lg);

.container-fluid expands to fill the available width.

@media (min-width: 568px) {
  .container {
    width: 550px;
  }
}
@media (min-width: 992px) {
  .container {
    width: 970px;
  }
}
@media (min-width: 1200px) {
  .container {
    width: 1170px;
  }
}

Depending on the width of the viewport that the webpage is being viewed on, the container class gives its div a specific fixed width.

Your .container-fluid element, on the other hand, will constantly resize as you make even the smallest changes to your browser width.


This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow