CSS Grid Generator

Your workspaceProcessed on your device
Grid tracks and alignment
Grid items and areas

Leave areas blank for automatic items. For named areas, enter one line per row and one name or dot per column.

Live CSS grid
Item 1
Item 2
Item 3
Item 4
Item 5
Item 6
Generated output

A few things to know.

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.

  1. Open Page shell to preview a full-width masthead, a sidebar, main content and a footer.
  2. Set columns, rows and gaps. For named areas, type one row at a time with a name or dot per cell.
  3. Resize the preview and check placement. Export both CSS and HTML to keep item classes and area names paired.