Using the Bootstrap Grid classes
You can create a page layout through a series of rows and columns that house your content. To set the maximum width of the page content according to the screen width, you have to use the .container
class.
Note
Containers help define the space to be used by the Grid system.
The container width is set as follows:
- Phone screens (less than 768 px resolution): The width of the container is the same width as the width of the screen
- Tablet screens (between 768 px and 992 px resolution): The maximum width of the container is 750 px
- Small desktop screens (between 992 px and 1200 px resolution): The maximum width of the container is 970 px
- Large desktop screens (more than 1200 px resolution): The maximum width of the container is 1170 px
The class prefixes used for small phone screens, tablets, small desktop screens, and large desktop screens are .col-xs-
, .col-sm-
, .col-md-
, and .col-lg-
, respectively. The default gutter width is 30 px.
Note
Gutters are usually desirable...