CSS Flexbox Playground
Try CSS Flexbox container and item settings in a resizable preview. Edit basis, grow, shrink, order and alignment, then copy or download CSS, HTML and a layout report.
Find the Exact Width Where a Flex Row Wraps
CSS Flexbox Playground: how to use it
- Load Card row and compare a preview width of 408 pixels with 407 pixels. The third card moves to a new line at the narrower width.
- Change container direction, wrapping, alignment, gap or padding. Select an item to change its flex sizing and cross-axis alignment.
- Copy the generated CSS and HTML into your project. Use Report to save the chosen values separately.
Limits and notes
One flex container with up to 12 items and bounded numeric settings. Preview width and height are separate from the exported layout. Your work stays in the browser.
How your privacy works →CSS Flexbox Playground: common questions
What does flex-basis change?
It sets an item's starting main-axis size before the browser distributes extra or missing space.
What is the difference between Item alignment and Line alignment?
Item alignment positions children within a flex line. Line alignment distributes wrapped lines along the cross axis when the container has room.
Does Item order change the generated HTML order?
The order property changes visual placement. Keep the HTML in reading order so speech and keyboard navigation follow the intended sequence.