CSS Grid Generator
Generate CSS Grid rows, columns, line gaps, alignment and named areas. Test fixed or responsive track sizing and copy matching CSS and HTML.
Build a Page Shell with Named CSS Grid Areas
CSS Grid Generator: how to use it
- Open Page shell to preview a full-width masthead, a sidebar, main content and a footer.
- Set columns, rows and gaps. For named areas, type one row at a time with a name or dot per cell.
- Resize the preview and check placement. Export both CSS and HTML to keep item classes and area names paired.
Limits and notes
Up to 12 explicit tracks per axis and 24 automatically placed items. Supports track lengths, fr, auto, min-content, max-content, minmax(), fit-content() and repeat(). Named areas require fixed track counts and rectangular shapes. Processing stays in your browser.
How your privacy works →CSS Grid Generator: common questions
Can I use auto-fit and minmax() for responsive cards?
Yes. Choose Responsive cards to try repeat(auto-fit, minmax(136px, 1fr)), then change the preview width to see when a column disappears.
Why does a named area produce a rectangle error?
Every cell in one named area must form a single filled rectangle. Rename or move cells that create a notch, gap or second region.
Do rows and columns need the same gap?
Set row and column gaps separately. The generated CSS preserves both values.