CSS Grid Builder
Choose equal columns and rows or responsive auto-fit columns, then adjust the preview and export.
CSS Grid Builder
Choose equal columns and rows or responsive auto-fit columns, then adjust the preview and export.
Equal mode uses 1–12 columns and 1–12 rows. Columns use minmax(0, 1fr); default rows and extra implicit rows use minmax(64px, auto). Cell count is independent of the track count.
Responsive mode uses repeat(auto-fit, minmax(column minimum, 1fr)); column minimum is 40–1,200 px. Without a row template, rows are implicit. A minimum wider than the container can overflow.
An optional row template replaces the default explicit rows in either mode. It must be accepted by this browser for grid-template-rows, use at most 120 characters and 12 repeats/tracks, and have numeric values no greater than 1,200. External references, declaration separators and negative values are rejected.
Gap is 0–64 px; optional row and column gaps override it independently. Justify-items and align-items use stretch, start, center or end. Named areas, individual item placement and breakpoint editing are not included.
Live grid preview
Change the values to update the preview and CSS.
Preview and export are made in this browser. Nothing is uploaded or stored.
A QUICK WALKTHROUGH
How to use this tool
- Choose equal columns and rows or responsive auto-fit columns, then adjust the preview and export.
- Gap is 0–64 px; optional row and column gaps override it independently. Justify-items and align-items use stretch, start, center or end. Named areas, individual item placement and breakpoint editing are not included.
- Preview and export are made in this browser. Nothing is uploaded or stored.
Equal tracks
Equal mode uses 1–12 columns and 1–12 rows. Columns use minmax(0, 1fr); default rows and extra implicit rows use minmax(64px, auto). Cell count is independent of the track count.
Responsive auto-fit
Responsive mode uses repeat(auto-fit, minmax(column minimum, 1fr)); column minimum is 40–1,200 px. Without a row template, rows are implicit. A minimum wider than the container can overflow.
Row template (optional)
An optional row template replaces the default explicit rows in either mode. It must be accepted by this browser for grid-template-rows, use at most 120 characters and 12 repeats/tracks, and have numeric values no greater than 1,200. External references, declaration separators and negative values are rejected.
Mode
Gap is 0–64 px; optional row and column gaps override it independently. Justify-items and align-items use stretch, start, center or end. Named areas, individual item placement and breakpoint editing are not included.
Download HTML + CSS
Preview and export are made in this browser. Nothing is uploaded or stored.
GOOD TO KNOW
Common questions
Equal tracks
Equal mode uses 1–12 columns and 1–12 rows. Columns use minmax(0, 1fr); default rows and extra implicit rows use minmax(64px, auto). Cell count is independent of the track count.
Responsive auto-fit
Responsive mode uses repeat(auto-fit, minmax(column minimum, 1fr)); column minimum is 40–1,200 px. Without a row template, rows are implicit. A minimum wider than the container can overflow.
Row template (optional)
An optional row template replaces the default explicit rows in either mode. It must be accepted by this browser for grid-template-rows, use at most 120 characters and 12 repeats/tracks, and have numeric values no greater than 1,200. External references, declaration separators and negative values are rejected.