Bootstrap grid examples
Basic grid layouts to get you familiar with building within the Bootstrap grid system.
In these examples the .themed-grid-col class is added to the columns to add some theming. This is not a class that is available in Bootstrap by default.
Six grid tiers
Bootstrap 5 has six grid tiers. Each tier starts at a minimum viewport size and applies to larger devices unless overridden. The xxl tier begins at 1400px.
Three equal columns
Get three equal-width columns starting at desktops and scaling to large desktops. On mobile devices, tablets and below, the columns will automatically stack.
Three unequal columns
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.
Two columns
Get two columns starting at desktops and scaling to large desktops.
Full width, single column
No grid classes are necessary for full-width elements.
Two columns with two nested columns
Put a row of columns within an existing column. This gives you two columns starting at desktops and scaling to large desktops, with another two equal-width columns within the larger column.
At mobile device sizes, tablets and down, these columns and their nested columns will stack.
Mixed: mobile and desktop
The Bootstrap 5 grid system has six tiers: xs, sm, md, lg, xl, and xxl. Use a combination of these classes to create flexible layouts.
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.