info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: Grid Template for Bootstrap info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54: info@54:
info@54: info@54: info@54: info@54:

Three equal columns

info@54:

Get three equal-width columns starting at desktops and scaling to large desktops. On mobile devices, tablets and below, the columns will automatically stack.

info@54:
info@54:
.col-md-4
info@54:
.col-md-4
info@54:
.col-md-4
info@54:
info@54: info@54:

Three unequal columns

info@54:

Get three columns starting at desktops and scaling to large desktops of various widths. Remember, grid columns should add up to twelve for a single horizontal block. More than that, and columns start stacking no matter the viewport.

info@54:
info@54:
.col-md-3
info@54:
.col-md-6
info@54:
.col-md-3
info@54:
info@54: info@54:

Two columns

info@54:

Get two columns starting at desktops and scaling to large desktops.

info@54:
info@54:
.col-md-8
info@54:
.col-md-4
info@54:
info@54: info@54:

Full width, single column

info@54:

No grid classes are necessary for full-width elements.

info@54: info@54:
info@54: info@54:

Two columns with two nested columns

info@54:

Per the documentation, nesting is easy—just put a row of columns within an existing row. This gives you two columns starting at desktops and scaling to large desktops, with another two (equal widths) within the larger column.

info@54:

At mobile device sizes, tablets and down, these columns and their nested columns will stack.

info@54:
info@54:
info@54: .col-md-8 info@54:
info@54:
.col-md-6
info@54:
.col-md-6
info@54:
info@54:
info@54:
.col-md-4
info@54:
info@54: info@54:
info@54: info@54:

Mixed: mobile and desktop

info@54:

The Bootstrap 3 grid system has four tiers of classes: xs (phones), sm (tablets), md (desktops), and lg (larger desktops). You can use nearly any combination of these classes to create more dynamic and flexible layouts.

info@54:

Each tier of classes scales up, meaning if you plan on setting the same widths for xs and sm, you only need to specify xs.

info@54:
info@54:
.col-xs-12 .col-md-8
info@54:
.col-xs-6 .col-md-4
info@54:
info@54:
info@54:
.col-xs-6 .col-md-4
info@54:
.col-xs-6 .col-md-4
info@54:
.col-xs-6 .col-md-4
info@54:
info@54:
info@54:
.col-xs-6
info@54:
.col-xs-6
info@54:
info@54: info@54:
info@54: info@54:

Mixed: mobile, tablet, and desktop

info@54:

info@54:
info@54:
.col-xs-12 .col-sm-6 .col-lg-8
info@54:
.col-xs-6 .col-lg-4
info@54:
info@54:
info@54:
.col-xs-6 .col-sm-4
info@54:
.col-xs-6 .col-sm-4
info@54:
.col-xs-6 .col-sm-4
info@54:
info@54: info@54:
info@54: info@54:

Column clearing

info@54:

Clear floats at specific breakpoints to prevent awkward wrapping with uneven content.

info@54:
info@54:
.col-xs-6 .col-sm-3
info@54:
.col-xs-6 .col-sm-3
info@54: info@54: info@54:
info@54: info@54:
.col-xs-6 .col-sm-3
info@54:
.col-xs-6 .col-sm-3
info@54:
info@54: info@54:
info@54: info@54:

Offset, push, and pull resets

info@54:

Reset offsets, pushes, and pulls at specific breakpoints.

info@54:
info@54:
.col-sm-5 .col-md-6
info@54:
.col-sm-5 .col-sm-offset-2 .col-md-6 .col-md-offset-0
info@54:
info@54:
info@54:
.col-sm-6 .col-md-5 .col-lg-6
info@54:
.col-sm-6 .col-md-5 .col-md-offset-2 .col-lg-6 .col-lg-offset-0
info@54:
info@54: info@54: info@54:
info@54: info@54: info@54: info@54: info@54: info@54: