CSS Grid Generator
Build CSS Grid layouts with a visual editor. Define columns, rows, gaps, and span cells across areas.
Preview (click cells to span)
12px
CSS
.container {
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: auto auto auto;
gap: 12px;
}How to Use CSS Grid Generator
- 1Set the number of columns and rows for your grid layout.
- 2Adjust column widths and row heights using the controls.
- 3Click and drag to span cells across multiple columns or rows.
- 4Set the gap between grid cells.
- 5Copy the generated CSS Grid code.
Zenovay
Privacy-first analytics for your website
Understand your visitors without invasive tracking. GDPR compliant, lightweight, and powerful.
Related Tools
CSS Gradient GeneratorCreate beautiful CSS gradients with a visual editor. Linear, radial, and conic gradients.
CSS Box Shadow GeneratorDesign CSS box shadows with visual controls. Adjust offset, blur, spread, and color.
CSS Border Radius GeneratorCreate custom border radius values with visual controls. Link or unlink corners for quick adjustment.
CSS Flexbox PlaygroundLearn and generate CSS Flexbox layouts visually. Adjust direction, alignment, wrapping, and gap in real time.
Frequently Asked Questions
What is CSS Grid?▾
CSS Grid Layout is a two-dimensional layout system for the web. It lets you lay out items in rows and columns, making it easy to design complex layouts without floats or positioning.
How do grid-template-columns and grid-template-rows work?▾
grid-template-columns defines the number and width of columns, while grid-template-rows defines the number and height of rows. Use fr units for flexible proportions, px for fixed sizes, or auto for content-based sizing.
What is the fr unit?▾
The fr (fraction) unit represents a fraction of the available space in the grid container. For example, 1fr 2fr creates two columns where the second is twice as wide as the first.
How do I span items across multiple cells?▾
Click on a grid cell to start a span, then click an adjacent cell to extend it. The tool generates grid-column and grid-row span rules for the selected item.
Can I use this tool on my phone?▾
Yes, the CSS Grid generator works in any modern mobile browser. Configure your grid layout visually and copy the CSS on any device.
Does the generated CSS include HTML markup?▾
Yes. The tool generates both the CSS grid styles and a matching HTML structure, so you can copy a complete working grid layout directly into your project.
Can I customize the gap between grid cells?▾
Yes. Adjust the row and column gap values to control spacing between grid items. The tool uses the standard CSS gap property, which is supported in all modern browsers.