Free, independent guides since 2010

Design

Whitespace and layout grids: calm, readable pages

How whitespace and layout grids make websites easier to read and more professional: spacing scales, alignment, content width, grid systems in CSS and common layout mistakes.

<guide section="Design" type="article" read="2 min"/>

The difference between an amateur and a professional design is often not colour or fonts, but spacing and alignment. Generous, consistent whitespace makes content easier to scan; a grid makes a page feel ordered. Whether you build the site yourself or hire a web design company, these principles apply.

Whitespace has a job

  • Grouping: items close together belong together (the law of proximity).
  • Separation: more space between sections than within them.
  • Focus: space around a button or heading draws attention to it.
  • Readability: line height and paragraph spacing make text comfortable.

Use a spacing scale

CSS
:root {
  --space-1: .25rem; --space-2: .5rem; --space-3: 1rem;
  --space-4: 1.5rem; --space-5: 2.5rem; --space-6: 4rem;
}
.card { padding: var(--space-4); }
.section { margin-block: var(--space-6); }

A fixed scale with CSS variables prevents the “almost the same” spacing that makes pages look messy.

Grids

CSS
.layout {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--space-4);
}
.main { grid-column: 1 / 9; }
.aside { grid-column: 9 / 13; }
@media (max-width: 50rem) { .main, .aside { grid-column: 1 / -1; } }

See flexbox and grid for the technical details, and mobile-first design for small screens.

Content width

Keep body text around 60–75 characters per line (max-width: 68ch), even on wide screens. Let images, tables and colour bands go wider for rhythm.

Common mistakes

MistakeFix
Equal spacing everywhereMore space between sections than inside them
Elements that almost alignSnap everything to the same grid lines
Text across the full width of a large screenLimit the content width
Cramped buttons and cardsGenerous padding from the spacing scale

Frequently asked questions

Does whitespace push important content below the fold?

Some, but visitors scroll easily. A calm, clear page that people understand beats a crowded page that shows everything at once.

How many grid columns should I use?

Twelve columns are a common, flexible choice for large layouts, but many small sites only need a single content column plus an occasional two- or three-column section.