belun.app

CSS Grid Generator — Visual Grid Layout Builder

Columns 3
Rows 2
column-gap 12px
row-gap 12px
justify-items
align-items
Click a cell to place it
display: grid;

A visual builder for CSS Grid. Set how many columns and rows you want, size each track in fr, px, %, or auto, adjust the row and column gaps, and click any cell to make it span several columns or rows. The preview updates as you go, and the generated grid-template CSS is ready to paste into your stylesheet.

Grid code is generated locally in your browser and never sent to a server.

Frequently asked questions

How do I make an item span two columns?
Click that cell in the preview and set its column span to 2. The generated CSS uses grid-column: span 2, which spans two tracks from wherever the item is auto-placed. If you set a start line as well, the output becomes grid-column: 2 / span 2, pinning it to a specific column.
Why does the generated CSS use repeat()?
When every track in a row or column list is the same size, repeat(n, size) says the same thing in less code and is easier to change later. The tool collapses identical tracks automatically; as soon as you give one track a different size, the full explicit list is written out instead.

Related tools