Grid
Grid options
Bootstrap grid system allow all six breakpoints, and any breakpoints you can customize.
Extra small <576px |
Small ≥576px |
Medium ≥768px |
Large ≥992px |
Extra large ≥1200px |
Extra extra large ≥1400px |
|
---|---|---|---|---|---|---|
Grid behavior | Horizontal at all times | Collapsed to start, horizontal above breakpoints | ||||
Max container width | None (auto) | 540px | 720px | 960px | 1140px | 1320px |
Class prefix | .col- |
.col-sm- |
.col-md- |
.col-lg- |
.col-xl- |
.col-xxl- |
# of columns | 12 | |||||
Gutter width | 1.5rem (.75rem on left and right) | |||||
Nestable | Yes | |||||
Offsets | Yes | |||||
Column ordering | Yes |
Grid for column
You may use predefined grid classes. Using .col-md-*
you can set the grid system.
Vertical alignment
You can use the align-items-*
class to set the vertical alignment.
Horizontal alignment
You can use the justify-content-*
class to set the horizontal alignment.
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.
Order
Using .order
class, you can set the order position.
Offset
You can offset the grid column using .offset-*
grid class.
Since 9 + 4 = 13 > 12, this 4-column-wide div gets wrapped onto a new line as one contiguous unit.
Subsequent columns continue along the new line.
With the move to flexbox in v4, you can use margin utilities like .me-autoto force sibling columns away from one another.
You may also apply this break at specific breakpoints with our responsive display utilities.
The .col-* classes can also be used outside a .row to give an element a specific width. Whenever column classes are used as non direct children of a row,the paddings are omitted.
The classes can be used together with utilities to create responsive floated images. Make sure to wrap the content in a .clearfix wrapper to clear the float if the text is shorter.
![...](assets/img/supplier/edit-supplier.jpg)
A paragraph of placeholder text. We're using it here to show the use of the clearfix class. We're adding quite a few meaningless phrases here to demonstrate how the columns interact here with the floated image.
As you can see the paragraphs gracefully wrap around the floated image. Now imagine how this would look with some actual content in here, rather than just this boring placeholder text that goes on and on, but actually conveys no tangible information at. It simply takes up space and should not really be read.
And yet, here you are, still persevering in reading this placeholder text, hoping for some more insights, or some hidden easter egg of content. A joke, perhaps. Unfortunately, there's none of that here.