Skip to content

Grid

You can responsively position elements using a flexbox grid. First, create a row to contain your columns with the .row class. Then add your columns within your row using one of the following classes: .col for all breakpoints, .col-sm for small breakpoints and up, .col-md for medium breakpoints and up, .col-lg for large breakpoints and up, and .col-xl for extra large breakpoints and up. These column classes will automatically size any number columns equally. Resize your browser to see them in action below.

.col
.col
.col-sm
.col-sm
.col-sm
.col-md
.col-md
.col-md
.col-md
.col-lg
.col-lg
.col-lg
.col-xl
.col-xl

Your content should always be within a column, and that column should always be within a row. You can also responsively define the column size based on a 12-column grid. You can make any class responsive just by adding *-sm, *-md, *-lg, or *-xl to the class name, but before a number if it contains one.

.col-6
.col-6
.col-sm-5
.col-sm-7
.col-md-4
.col-md-8
.col-md-8
.col-md-4
.col-lg-7
.col-lg-5
.col-xl-6
.col-xl-6

Containers are optional and can be added when needed. You can also add a .gap to containers or rows, .align rows to containers, responsively offset columns by a specified amount with the .off-* classes, embed rows within rows, and add a grid .outline class for development or debugging purposes.

.off-4
.row
.col-sm-4
.off-sm-4
.off-md-4
.col-md-2
.off-lg-2
.off-lg-4

You can even .reverse columns, reorder columns to be .first or .last in a row, and change the row alignment or distribution of columns.

1
2
3
1
2
3
4
.center
.end
just
some
content
.middle
some
more
content
.bottom
.around
.around
.around
.between
.between
.between
Intro Type Tables Forms Grid Download