Grid is a two-dimensional layout system: you define columns and rows at once, and each item can span as many tracks as it needs in either direction.
`grid-template-columns` and `grid-template-rows` define the size of each container track. The `fr` unit distributes the remaining space proportionally after fixed sizes (px, %) have already been reserved, which is why `1fr 1fr 1fr` creates three equal columns that adapt to the available width. The `minmax(min, max)` function locks a floor and a ceiling for a track, widely used with `repeat(auto-fit, minmax(220px, 1fr))` to build responsive grids without a single media query, the browser works out on its own how many columns fit. Each item is positioned with `grid-column` and `grid-row`, which accept the `start-line / end-line` notation, grid lines are numbered starting at 1, not the tracks between them. `auto-fit` collapses empty tracks, `auto-fill` keeps the reserved space even without content, the difference only shows up when there are fewer items than columns that would fit.
How to use
Pick a preset, adjust the tracks and position the items.
Start from a preset or set the number and type of column and row tracks (fr, px, %, auto or minmax).
Click an item in the preview to select it, drag to move it, or use the handle in the bottom-right corner to resize its span. The number fields next to it offer the same control via keyboard.
Copy the container and item CSS, or switch to Tailwind whenever the configuration has an equivalent on the default scale.
Embed
Use this tool on your site
Paste the code into your HTML and the tool shows up on your page, without J-Kit's navigation and ads. It still runs in the browser of whoever visits your site.
These references help contextualize formulas, standards, APIs and limitations used on this page. They do not replace professional validation when a result has legal, financial, medical or operational impact.
Percentage is computed against the container's full width. `fr` distributes whatever space is left after fixed-size tracks (px, minmax minimum) are already reserved, which is why `1fr 200px` lets the first column take everything not used by the 200px track, something percentage alone can't express.