Skip to content
Web Codes Stack
Explore Free Tools

CSS Flexbox Playground

Adjust direction, wrapping, alignment, and item sizing. Test the layout at different widths and copy the generated CSS or HTML.

Container

Align content distributes space between flex lines when wrapping is enabled.

Customize one item

Live preview

100%

Generated code

Use the generated layout

Copy the CSS to your stylesheet and the matching HTML to your page. The example CSS sets a 240px container height so you can see vertical alignment and column wrapping. Adjust the height to suit your layout.

The width slider tests the preview at different widths within the panel. CSS Flexbox reference