Grids
A shared structure that makes alignment automatic and layout decisions repeatable.
Definition
A layout grid divides the available space into columns and gutters, giving elements a consistent set of positions to occupy. On the web, CSS Grid makes true two-dimensional grids available directly, which removes most of the historical reason for rigid twelve-column frameworks.
Craft convention. True because the industry converged on it. Breaking it costs familiarity, not correctness.
On this page
Common column counts
| Columns | Divides into | Typical use |
|---|---|---|
| 4 | Halves, quarters | Small screens. |
| 6 | Halves, thirds | Tablet. |
| 8 | Halves, quarters | Small desktop. |
| 12 | Halves, thirds, quarters, sixths | The general-purpose default. |
| 16 | Many divisions | Dense application layouts. |
A grid that does not need a framework
.page {
display: grid;
grid-template-columns:
[full-start] minmax(1rem, 1fr)
[content-start] min(68rem, 100% - 2rem)
[content-end] minmax(1rem, 1fr)
[full-end];
}
.page > * { grid-column: content; }
.page > .bleed { grid-column: full; }
/* Auto-fitting card grid: no breakpoints needed */
.cards {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
gap: var(--space-6);
}Named lines create a content column with full-bleed capability. Items opt into the width they need rather than counting columns.
In practice
Full-bleed sections inside a content grid
Content pagesNamed grid lines let an image break out to the full viewport width while the surrounding prose stays in the readable column, without wrapper divs or negative margins.
Sources
Where a source establishes something narrower than the popular reading of it, the note says so.
MDN Web Docs
Grid Systems in Graphic Design
J. Müller-Brockmann, Niggli, 1981
Continue from here
Each link says what the connection is, so you can tell a principle from an alternative from a thing people mix this up with.
Applies when you are designing
Often used with
These usually appear in the same screen or the same decision.
- WebflowTool
- Spacing SystemsUI foundation
A grid without a spacing scale produces alignment with no rhythm.
Related concept
Connected closely enough to change how you apply this.
- AlignmentUI foundation
- BalanceUI foundation
- BreakpointsUI foundation
- ColumnsUI foundation
- CompositionUI foundation
- ContainersUI foundation
- ProportionUI foundation
- Responsive LayoutUI foundation