What is the CSS Grid Generator?
CSS Grid lays out content in rows and columns. This generator writes the grid-template CSS for fixed or responsive layouts and shows the result as you change it.
How to use it
- 1
Choose columns and rows
Or turn on responsive.
- 2
Set the gap and sizes
Watch the preview.
- 3
Copy the code
CSS, HTML or Tailwind.
Features
Fixed or responsive
Set columns, or let them auto-fit a minimum width.
Any track size
fr, px, minmax() and more.
Three outputs
CSS, HTML and Tailwind classes.
Popular uses
Card grids
Product and blog listings.
Dashboards
Panel layouts.
Galleries
Responsive image grids.
Frequently asked questions
What does auto-fit do?
Fits as many columns as there's room for, each at least the minimum width.
What is 1fr?
One share of the free space.