CSS layout generator

Build a responsive Grid or wrapping Flexbox layout from your item labels, choose the columns on phones, then copy its CSS and HTML.

Privacy: runs in your browser

This tool processes your input in this browser. Inputs and results are excluded from analytics. Draft saving is optional and stays on this device; delete saved text with the draft controls. Loading text from a URL is optional and contacts that server; its URL and your IP address are visible to the server. When a button sends your result to another tool, it waits in this tab until that tool opens it, for up to a minute, and is then deleted.

Copy link includes the inputs you choose to share in the address. Anyone with that link can reopen them. Files and generated results are excluded. Password and key tools share settings only.

Options and local file

Optional settings apply only to this tab.

Your result

CSS

 

HTML

 
Standalone page (HTML)

More
Keyboard shortcuts

Sharing and starting over

A copied link includes what you entered and your settings, so anyone with it can see them. Leave private text out. Files and results are not included; random draws are made again.

Start over puts the tool back to its starting values and closes any open file or device. Drafts you saved stay on this device until you delete them.

CSS layout generator explained

Generate a responsive Grid or wrapping Flexbox layout from item labels. Set the grid columns for wide screens and for phones, the gap or the flex basis, check the preview at phone, tablet and desktop width, then copy the CSS and the HTML, or download the standalone page the preview uses.

Next: CSS formatter

Next: CSS specificity calculator

Next: Contrast checker

Worked example

A three-column grid uses repeat(3, minmax(0, 1fr)) so long labels can wrap inside equal-width columns. Flexbox instead wraps items according to their preferred basis and the available space.

Before you rely on the result

A layout starter, not a full website builder or browser-compatibility audit. The preview's colours are for demonstration and stay out of the CSS you copy. Grid switches to the phone column count at one width; add another media query when your design also needs a tablet count.

Cite this page

ToolOctopus. “CSS layout generator.” Updated . https://tooloctopus.com/css-layout-studio.

Add an access date if your instructions require one.

Citation formatting uses citeproc-js by Frank Bennett and Citation Style Language styles. License and source code.

Find a tool

Type a task, a unit pair, a sum or a time zone. ↓ to choose, Enter to open.