Layout and Grid Systems
Overview
A grid system is a set of columns and gutters that content aligns to, so a page's blocks line up with each other even when they hold different amounts of content. CSS Grid and Flexbox are the tools; the grid itself is the underlying discipline of alignment.
Why It Matters
Without a grid, every block is positioned by eye, which drifts inconsistently across a page and breaks the moment content length changes. A grid turns "does this look aligned" into "is this on the same column," a question that is easy to answer consistently.
Core Principles
- Columns plus gutters, not arbitrary positioning. Every block's width and position should trace back to a column count and a gutter size, not a one-off pixel value.
- Alignment is a design principle, not a CSS feature. A strong grid establishes order and balance; consistent alignment is what makes a layout read as intentional rather than assembled.
- More columns, more flexibility, not more complexity for the viewer. A 12 column grid lets different sections use different proportions (6+6, 4+4+4, 8+4) while everything still aligns to the same underlying structure.
Interactive Demo
No grid: each block is a full-width block stacked with no shared column structure. Switch to 4 or 12 column to see the same blocks align to a shared grid.
Common Mistakes
- Eyeballing alignment instead of snapping to a defined column count, which drifts as content changes.
- Using a grid for column count but ignoring gutter consistency, so columns line up but spacing between them does not.
- Picking a column count that does not divide cleanly into the section widths actually needed (for example, a 5 column grid for content that only ever needs halves, thirds, and quarters).
Related Concepts
- Visual Hierarchy: hierarchy expressed through position depends on a grid to be consistent.
- Spacing and Rhythm: gutters and grid spacing share the same underlying scale.
- Navigation and Information Architecture: builds on grid-based layout to place navigation consistently.
Used In Templates
Demonstrated directly in the Portfolio Site, Documentation Site, E-commerce Storefront, Restaurant and Menu Site, Real Estate Listing Site, Community and Forum Homepage, and Internal Dashboard and Admin Panel templates; see docs/PRD.md section 13.2.
Summary
A grid system is the shared column and gutter structure that lets every block on a page align to something consistent instead of an eyeballed guess. It is the structural half of hierarchy: position is one of hierarchy's main tools, and a grid is what makes position reliable.