Flexbox Generator

Interactive Flexbox playground with copyable CSS output.

Runs entirely in your browser
1
2
3
4
5
8px
5
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: stretch;
gap: 8px;

FAQ

How does align-items differ from align-content?
align-items positions items on the cross axis within a single line. align-content positions the lines themselves when wrap is on and there's extra cross-axis space.
Why don't my items grow?
Flex items default to flex: 0 1 auto, meaning they can shrink but not grow. Set flex-grow ≥ 1 on the items you want to fill space.

Related tools