πŸ“ CSS Flexbox Playground

Container Properties

Selected Item Properties

Click an item in the preview to edit its properties

Live Preview

CSS Code

FAQ

What is Flexbox?

Flexbox (Flexible Box Layout) is a CSS3 layout mode designed for aligning and distributing space within a container, even when item sizes are unknown or dynamic. It simplifies complex layout implementations.

What is the difference between flex-grow, flex-shrink, and flex-basis?

flex-grow defines how items grow (how extra space is distributed), flex-shrink defines how items shrink (when space is insufficient), and flex-basis defines the initial size. Shorthand: flex: grow shrink basis.

What is the difference between justify-content and align-items?

justify-content controls alignment along the main axis, while align-items controls alignment along the cross axis. The main axis direction is determined by flex-direction.