</>
cssgenerators.dev
Star on GitHub
Tools / Flexbox

CSS Flexbox Generator

Build a flex container visually. Set direction, alignment and gap — watch items rearrange in real time. The most-used CSS flex generator online.

flex-direction
justify-content
align-items
flex-wrap
gap16px · 1rem
Demo items5
1
2
3
4
5
CSS
.container {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: stretch;
  flex-wrap: nowrap;
  gap: 16px;
}

CSS generated is free to use — no attribution required.

How do you use the CSS flex generator?

Click the direction arrows to set flex-direction. The visual buttons for justify-content and align-items show you a miniature layout so you can pick the right value at a glance. The colored numbered boxes in the preview reflect your settings live.

What are the CSS flexbox properties?

flex-direction sets the main axis (row = horizontal, column = vertical). justify-content controls spacing along the main axis. align-items controls alignment on the cross axis. flex-wrap determines whether items wrap to new lines. gap sets spacing between items without needing margins.

What are the flex-direction values?

row (default, left to right), row-reverse (right to left), column (top to bottom), column-reverse (bottom to top).

What are the justify-content values in CSS Flexbox?

flex-start, center, flex-end, space-between (equal gaps between items), space-around (equal space around items), space-evenly (equal space everywhere).

What is the browser compatibility for CSS Flexbox?

CSS Flexbox is supported in all modern browsers at 99%+. No vendor prefixes are required in modern codebases. The old display: box syntax from 2009 is obsolete.

From the blog
CSS Flexbox Guide: the complete visual reference →
Other CSS Tools
CSS GridBox ShadowButtonBorderFilter