Flex properties
Only visible when the items wrap onto more than one line — set flex-wrap to wrap and add items.
The flex shorthand applies to every item: 1 makes them grow equally, 0 0 120px fixes each item at 120px.
Live preview
The dashed box is .flex-container; every blue tile is a .flex-item. Properties are applied inline so the preview always matches the generated CSS.
Generated CSS
/* Flexbox playground — generated by InstantTools.site */
.flex-container {
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
align-content: flex-start;
flex-wrap: nowrap;
gap: 16px;
}
.flex-item {
flex: 1;
}
265 characters · 5 preview items
What each flexbox property controls
- flex-direction sets the main axis; row-reverse and column-reverse flip the visual order.
- justify-content distributes free space along the main axis, align-items along the cross axis.
- align-content only has an effect when there is more than one line of items, so it needs
flex-wrap: wrap(orwrap-reverse) and enough items to wrap. - gap adds space between items and is supported everywhere modern — the older margin trick is only needed for very old browsers.
Everything runs locally in your browser — nothing is uploaded, stored, or logged.