Developer tools
CSS Grid generator: equal columns
Generate CSS Grid code with equal columns, gap, row height and numbered items, plus a breakpoint that switches to fewer columns on narrow screens.
The example values can be changed. Press Calculate to update the result; you can download it as TXT or CSV and collect scenarios in this tab. Nothing is saved or sent automatically.
Result
Method:
All columns are equal (repeat(n, minmax(0, 1fr))); on narrow screens the breakpoint switches to fewer columns. For columns of different widths, edit the grid-template-columns value in the generated CSS.
Decimal results are approximate. Inputs stay in this browser tab.
How it works
Your entries are checked against the allowed ranges and written as ready-to-paste code: CSS keyframes, CSS Grid, an HTML form with labels, or a table as HTML, CSV, Markdown or LaTeX. All columns are equal (repeat(n, minmax(0, 1fr))); on narrow screens the breakpoint switches to fewer columns. For columns of different widths, edit the grid-template-columns value in the generated CSS.
Worked example
Editable example: columns=3, items=7, gap=12, rowHeight=60, mobileColumns=1, breakpoint=600, exportFormat=css
Frequently asked questions
What does the CSS Grid generator create?
It generates equal CSS grid tracks with auto-positioned numbered items and a viewport breakpoint.
Which settings does the CSS Grid generator use?
Columns, number of items, gap, row height, mobile columns and breakpoint. The example uses 3 columns, 7 items, gap 12, row height 60, 1 mobile column and a 600 breakpoint.
Can I make columns of different widths?
No. The CSS Grid generator creates equal columns only.
Which formats can I export the grid in?
The grid can be downloaded as HTML, CSS, CSV, Markdown or LaTeX.
Is my grid layout saved?
No automatic saving or sending takes place. Up to 30 explicitly added scenarios can be collected in the browser tab.