Loading
Grid System
Extra small
<576px
Small
≥576px
Medium
≥768px
Large
≥992px
Extra large
≥1200px
Max container widthNone (auto)540px720px960px1140px
Class prefix.col-.col-sm-.col-md-.col-lg-.col-xl-
# of columns12
Gutter width30px (15px on each side of a column)
NestableYes
Column orderingYes
Equal Width
For example, here are two grid layouts that apply to every device and viewport, from xs to xl. Add any number of unit-less classes for each breakpoint you need and every column will be the same width.
1 of 2
2 of 2
1 of 3
2 of 3
3 of 3
Multi row
col
col
col
col
One column with fixed width use predefine grid classes or inline width
1 of 3
2 of 3 (wider)
3 of 3
Mix and Match
Don’t want your columns to simply stack in some grid tiers? Use a combination of different classes for each tier as needed. See the example below for a better idea of how it all works.
.col-12 .col-md-8
.col-6 .col-md-4
.col-6 .col-md-4
.col-6 .col-md-4
.col-6 .col-md-4
.col-6
.col-6
On Gutters and Reordering
The gutters between columns in our predefined grid classes can be removed with .no-gutters. This removes the negative margins from .row and the horizontal padding from all immediate children columns.
.col-12 .col-sm-6 .col-md-8
.col-6 .col-md-4
Use .order- classes for controlling the visual order of your content. These classes are responsive, so you can set the order by breakpoint (e.g., .order-1.order-md-2). Includes support for 1 through 12 across all five grid tiers.
First, but unordered
Second, but last
Third, but first
First, but last
Second, but unordered
Third, but first
Offset Classes
Move columns to the right using .offset-md-* classes. These classes increase the left margin of a column by * columns. For example, .offset-md-4 moves .col-md-4 over four columns.
.col-md-4
.col-md-4 .offset-md-4
.col-md-3 .offset-md-3
.col-md-3 .offset-md-3
.col-md-6 .offset-md-3
Responsive Classes
Customize the size of your columns on extra small, small, medium, large, or extra large devices however you see fit. For grids that are the same from the smallest of devices to the largest, use the .col and .col-* classes. Specify a numbered class when you need a particularly sized column; otherwise, feel free to stick to .col.
col
col
col
col
col-8
col-4
Using a single set of .col-sm-* classes, you can create a basic grid system that starts out stacked and becomes horizontal at the small breakpoint (sm).
col-sm-8
col-sm-4
col-sm
col-sm
col-sm
Alignment
Use flexbox alignment utilities to vertically and horizontally align columns. Vertical alignment
Col
Col
Col
Col
Col
Col
Col
Col
Col
Col
Col
Col
Horizontal alignment
1 of 2 columns
1 of 2 columns
1 of 2 columns
1 of 2 columns
1 of 2 columns
1 of 2 columns
1 of 2 columns
1 of 2 columns
1 of 2 columns
1 of 2 columns