Main axis vs cross axis
justify-content aligns items on the main axis. align-items aligns them on the cross axis.
Experiment with flex direction, alignment, wrap and gap, then copy valid CSS output.
Updated
display: flex; flex-direction: row; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
Quick start
Tune core flex properties and watch immediate layout behavior.
Pick direction, justify, align, wrap and gap values.
Observe how item layout reacts in real time.
Paste the generated flex declarations into your project.
In-depth guide
Experiment with core flexbox properties and understand layout behavior instantly through a live preview.
justify-content aligns items on the main axis. align-items aligns them on the cross axis.
flex-direction to choose a row or column layout.justify-content and align-items to position items along each axis, and enable flex-wrap for multi-line layouts.Remember that gap now works in flexbox, so you rarely need margins between items anymore.
The classic confusion is which axis a property affects: in a column layout justify-content controls vertical placement and align-items controls horizontal. Items shrink below their content by default — add min-width: 0 to a flex child if long text refuses to wrap. Flexbox is one-dimensional; reach for CSS Grid when you need real rows and columns. Everything runs locally in your browser with no upload.
Use this tool for quick browser-based work when you need an answer or output immediately. Use a dedicated application or automated workflow when you need bulk processing, approvals, or repeatable production rules.
It controls whether items stay on one line or move to the next line when space runs out.
It always aligns across the cross-axis, and the cross-axis changes when flex-direction changes.
This version outputs raw CSS. Tailwind class output can be added in Sprint 2.
Use flexbox for one-dimensional layouts like a row of buttons or a navbar. Use CSS Grid when you need to align content in both rows and columns at once.
Use the gap property on the flex container. It works in all modern browsers and avoids fiddly margins on each child.
By default items will not shrink below their content size. Add min-width: 0 to the child so long content can compress and wrap.
Keep exploring
Hand-picked utilities that pair well with the one you're on — all free, client-side, and zero-signup.
Generate layered-looking box shadows with visual controls for offset, blur, spread and opacity.
Create custom rounded corners visually and copy exact border-radius CSS shorthand.
Build responsive CSS grid layouts with live rows, columns and gap controls.
Shrink PDF file size without uploading to a server.
Body Mass Index with metric / imperial inputs and WHO category bands.
Combine multiple PDFs into one in your browser.
Split a PDF by pages or page ranges, download as zip.