Flex container
A flexbox layout is defined using the flex or inline-flex values of the display property on the parent item. This element then becomes a flex container, and each one of its children becomes a flex item.
A flexbox layout is defined using the `flex` or `inline-flex` values of the `display` property on the parent item. This element then becomes a **flex container**, and each one of its children becomes a flex item.
A value of `flex` causes the element to become a block level flex container, and `inline-flex` an inline level flex container. These values create a **flex formatting context** for the element, which is similar to a block formatting context in that floats will not intrude into the container, and the margins on the container will not collapse with those of the items.
## See also
### Property reference
- align-content
- align-items
- flex
- flex-direction
- flex-flow
- flex-wrap
- justify-content
### Further reading
- [Basic concepts of flexbox](/docs/Web/CSS/Guides/Flexible_box_layout/Basic_concepts)
- [Aligning items in a flex container](/docs/Web/CSS/Guides/Flexible_box_layout/Aligning_items)
- [Mastering wrapping of flex items](/docs/Web/CSS/Guides/Flexible_box_layout/Wrapping_items)
- [CSS flexbox inspector: Examine flexbox layouts](https://firefox-source-docs.mozilla.org/devtools-user/page_inspector/how_to/examine_flexbox_layouts/index.html)
Cite this
"Flex container". MDN Web Docs. CC BY-SA 2.5 (MDN). https://developer.mozilla.org/en-US/docs/Glossary/Flex_Container