Grid system

Bootstrap 5 based Coats Digital Design Language Grid System. Use our powerful mobile-first flexbox grid to build layouts of all shapes and sizes. The twelve column system, six default responsive tiers will help the design device friendly.

Basic example

grid system uses a series of containers, rows, and columns to layout and align content. It’s built with flexbox and is fully responsive. Below is an example and an in-depth explanation for how the grid system comes together.

Column 1
Column 2
Column 3

                        
                          
                        
                      

The above example creates three equal-width columns across all devices and viewports using our predefined grid classes. Those columns are centered in the page with the parent .container.

Container

The grid system requires a containing element to wrap site contents and house our grid system. Without a container, the grid won't work properly.

Row

Rows create horizontal groups of columns. Therefore, if you want to split your layout horizontally, use .row.

Columns

The grid system allows up to 12 columns across the page.

.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-mx-1
.col-md-8
.col-md-4
.col-md-4
.col-md-4
.col-md-4
.col-md-6
.col-md-6

Grid options

The grid system can adapt across all six default breakpoints, and any breakpoints you customize. The six default grid tiers are as follow:

  • Extra small (xs)
  • Small (sm)
  • Medium (md)
  • Large (lg)
  • Extra large (xl)
  • Extra extra large (xxl)

Grid changes across the folowing breakpoints:

  xs <576px sm ≥576px md ≥768px lg ≥992px xl ≥1200px xxl ≥1400px
Container max-width None (auto) 540px 720px 960px 1140px 1320px
Class prefix .col- .col-sm .col-md .col-lg .col-xl .col-xxl
# off columns .col-
Gutter width 1.5rem (.75rem on left and right)
Custom gutters Yes
Nestable Yes
Column ordering Yes

Auto-layout columns

Utilize breakpoint-specific column classes for easy column sizing without an explicit numbered class like .col-sm-6.

Equal-width

There are two gird layouts that apply to every device and viewport, from xs to xxl. 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

                                
                                  
                                
                              

Setting one column width

Auto-layout for flexbox grid columns also means you can set the width of one column and have the sibling columns automatically resize around it.

1 of 3
2 of 3 (wider)
3 of 3
1 of 3
2 of 3 (wider)
3 of 3

                                
                                  
                                
                              

Variable width content

Use col-{breakpoint}-auto classes to size columns based on the natural width of their content.

1 of 3
Variable width content
3 of 3
1 of 3
Variable width content
3 of 3

                                
                                  
                                
                              

Responsive classes

Bootstrap’s grid includes six tiers of predefined classes for building complex responsive layouts. Customize the size of your columns on extra small, small, medium, large, or extra large devices however you see fit.

All breakpoints

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.

Variable width content

Use col-{breakpoint}-auto classes to size columns based on the natural width of their content.

col
col
col
col
col-8
col-4

                                
                                  
                                
                              

Stacked to horizontal

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

                                
                                  
                                
                              

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

                                
                                  
                                
                              

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.

Column
Column
Column
Column

                                
                                  
                                
                              
Column
Column
Column
Column

                                
                                  
                                
                              
Column
Column
Column
Column

                                
                                  
                                
                              
Column
Column
Column
Column

                                
                                  
                                
                              
Column
Column
Column
Column

                                
                                  
                                
                              
Column
Column
Column
Column

                                
                                  
                                
                              

Nesting

To nest your content with the default grid, add a new .row and set of .col-sm-* columns within an existing .col-sm-* column. Nested rows should include a set of columns that add up to 12 or fewer (it is not required that you use all 12 available columns).

Level 1: .col-sm-3
Level 2: .col-8 .col-sm-6
Level 2: .col-4 .col-sm-6