Book Image

Learning Bootstrap

Book Image

Learning Bootstrap

Overview of this book

Table of Contents (15 chapters)
Learning Bootstrap
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
Getting Started with Bootstrap
Index

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 because...