Grid
Refer Grid System in Boostrap 5 for more details.
ICPSR's grid system adopts 12 columns.
- Our grid supports six responsive breakpoints. Breakpoints are based on
min-width
media queries, meaning they affect that breakpoint and all those above it (e.g.,.col-sm-4
applies tosm
,md
,lg
,xl
, andxxl
). This means you can control container and column sizing and behavior by each breakpoint. - Containers center and horizontally pad your content. Use
.container
for a responsive pixel width,.container-fluid
forwidth: 100%
across all viewports and devices, or a responsive container (e.g.,.container-md
) for a combination of fluid and pixel widths. - Rows are wrappers for columns. Each column has horizontal
padding
(called a gutter) for controlling the space between them. Thispadding
is then counteracted on the rows with negative margins to ensure the content in your columns is visually aligned down the left side. Rows also support modifier classes to uniformly apply column sizing and gutter classes to change the spacing of your content. - Columns are incredibly flexible. There are 12 template columns available
per row, allowing you to create different combinations of elements that span
any number of columns. Column classes indicate the number of template columns
to span (e.g.,
col-4
spans four).width
s are set in percentages so you always have the same relative sizing.
When the browser window is resized column content no longer fits correctly. You can use multiple CSS selectors to create responsive breakpoints.
Responsive Breakpoints
The breakpoints below can be used together to control the column width at the specified viewports.
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- |
# of columns | 12 | |||||
Gutter width | 1.5rem (.75rem on left and right) |
By combining the selector classes above we can achieve a responsive grid layout where columns can expand or shrink when a breakpoint has been reached.
Example 12-column grid
1
2
3
4
5
6
7
8
9
10
11
12