Skip to content
IndexRequest a UIAboutContact

Modular Grid, Gutters & Margins

Change columns, gutter width and outer margin on a small page layout and toggle the column overlay.

Open alone ↗

AI prompt

PROMPT: PASTE INTO YOUR AI IMAGE OR VIDEO TOOL
Clean editorial web layout built on a strict 12-column grid with 24 pixel gutters and 40 pixel outer margins: a full-width hero image spanning all 12 columns, below it a main article block spanning 8 columns and a sidebar spanning 4, then three equal feature cards each spanning 4 columns, perfectly aligned edges, generous white space, light neutral palette with a single accent colour, thin column guide overlay at 10 percent opacity. Variant: 6 columns with 16 pixel gutters for a tighter mobile-friendly version. Negative: elements that do not align to columns, inconsistent gutters, overlapping blocks, decorative clutter.

About this pattern

Definition

A column grid divides the page into equal columns separated by gutters, inside outer margins. Every block snaps to whole columns, which gives layouts rhythm and alignment.

When to use it

  • 12 columns divide neatly into halves, thirds and quarters; 4 columns suit phones and 8 suit tablets.
  • Wider gutters feel airy and editorial; narrow gutters feel dense and dashboard-like.
  • Name the grid in prompts: "12-column grid, 24px gutters, wide margins, hero spanning all columns".

What the controls do

  • Columns selector (4, 6, 8, 12), Gutter and Margin sliders, Overlay switch.

Motion & timing

  • Layout changes apply instantly; blocks re-flow with a 150ms transition.
  • Reduced motion: no transition.

Tips & variations

  • Reduce the column count as the screen narrows; keep gutters and margins in the same family of values (8, 16, 24, 32).
  • Blocks span a share of the columns, not fixed widths.

Code of this live preview

HTML
<div class="bx"><div class="pg" id="pg"><div class="ov" id="ov"></div><div class="gr" id="gr"></div></div>
<div class="pre" id="pre" role="group" aria-label="Columns"><button data-n="4">4</button><button data-n="6">6</button><button data-n="8">8</button><button data-n="12" aria-pressed="true">12</button></div>
<div class="two"><label>Gutter <b id="gv">12px</b><input id="gt" type="range" min="4" max="24" value="12"></label><label>Margin <b id="mv">16px</b><input id="mg" type="range" min="6" max="32" value="16"></label></div><label class="sw"><input id="sh" type="checkbox" checked> Show columns</label></div>

Related patterns

Bento Grid

↗
Bento GridLayout Structures

Composition Grids

↗
Composition GridsLayout Structures

Sticky Header that Shrinks

↗
Sticky Header that ShrinksLayout & Scrolling