CSS Grid Generator

Build a grid with columns, row height, gap and alignment.


Columns use repeat() with equal 1fr tracks. The row height sets grid-auto-rows, so extra items keep the same size.

Frequently asked questions

Can tracks be different widths?

This generator makes equal columns. Replace 1fr in the copied CSS with sizes such as 200px 1fr 1fr when you need a sidebar.

What does 1fr mean?

One fraction of the space left after gaps. Three 1fr columns share that space equally.