css grid generator

Visual CSS Grid Layout Generator

Drag across cells to merge them into a named area — merged areas now render as one real block, so one column can stay a single tall region while its neighbor splits into three stacked rows. Size each column and row individually too: px, fr, auto, or content-based.

preview.html
controls
rows 3
columns 3
grid-container.css

          

Why grid-template-areas is hard to hand-write

Each row of a grid-template-areas value is a quoted string of area names, and every string needs the same number of names as there are columns — one typo or misalignment and the whole layout collapses. Painting the layout visually removes that bookkeeping, and starting from a Holy Grail, Sidebar, or Dashboard preset skips the blank-canvas problem entirely.

Using the generated CSS grid code

Apply the container rules to your wrapping element, then add grid-area: <name>; to each child using the class rules the generator writes underneath the template. Columns and rows aren't locked to equal 1fr tracks either — click any column or row size to cycle through fixed pixel widths, auto, content-based sizing, or flexible fr units.

Copied!