CSS Grid Generator
Visually create CSS Grid layouts. Set rows, columns, gaps, and copy the resulting CSS and HTML.
Features
How to Use
1. Set the number of rows and columns.
2. Adjust row heights and column widths (fr, px, auto).
3. Set grid gap.
4. Copy the generated CSS and HTML.
About this tool
CSS Grid lays out content in rows and columns at the same time, which makes it the natural choice for galleries, dashboards and page structures. This generator sets up a grid container visually: choose how many columns and rows you need, the gap between them, and how columns share space — equal fractions with 1fr, automatic sizing, minmax(0, 1fr) to stop long content from blowing out a column, or fixed 100px tracks. The preview shows how items flow into the tracks, and the CSS is written with repeat() for compact, readable output. Copy it as a starting point, then place individual items with grid-column and grid-row in your own stylesheet.