CSS Grid Playground

Prototype grid layouts and copy the CSS.

Runs in your browser Color & CSS Free · No account

Input

12
Processed locally

This tool runs entirely in your browser. The data you paste or load is never uploaded.

Result

Enter your input, then run the tool.

About this tool

Define columns, rows, gap and auto-flow, and copy ready-to-use grid CSS. The preview shows grid lines so the difference between explicit and implicit tracks is visible while you experiment.

How to use it

  1. Set the number of columns and rows.
  2. Adjust the gap and track sizing.
  3. Copy the generated CSS for the container.

Frequently asked questions

What does fr mean?
A fraction of the free space after fixed tracks and gaps are accounted for. 1fr 2fr gives the second column twice the width.
Why are extra rows appearing?
Items beyond the explicit grid create implicit rows. Set auto-rows to control their size.

Keep going

More in this category