CSS3 Flexbox

The CSS Flexible Box Layout Model, or "flexbox", is one of the specification in CSS3. It provides for the arrangement of elements on a page such that the elements behave predictably when the page layout must accommodate different screen sizes and different display devices. For many applications, the flexible box model provides an improvement over the block model in that it does not use floats, nor do the flex container's margins collapse with the margins of its contents.

For more details about using Flexbox, see Using CSS3 flexible boxes. Official spec is here.



* Click on flexbox values below and edit to see it in action.

flex container

.box {


flex item