
cross-start | cross-end: Flex lines are filled with items and placed into the container starting on the cross-start side of the flex container and going toward the cross-end side.Its direction depends on the main axis direction. cross axis: The axis perpendicular to the main axis is called the cross axis.Its main size property is thus either its width or height property, whichever is in the main dimension. main size: The width or height of a flex container or flex item, whichever is in the main dimension, is that box’s main size.main-start | main-end: The flex items are placed within the container starting on the main-start side and going toward the main-end side.The direction is based on the flex-direction property. main-axis: The main axis of a flex container is the primary axis along which flex items are laid out.Here are definitions of the key flexbox terms, taken from the official W3C specification for flexbox. Justify-content: flex-start | flex-end | center | space-between | space-around Īlign-items: flex-start | flex-end | center | baseline | stretch Īlign-content: flex-start | flex-end | center | space-between | space-around | stretch CSS that can be applied to items/elements in the container order: Īlign-self: auto | flex-start | flex-end | center | baseline | stretch Terminology Flexbox terminology diagram from official W3C specification.īefore you learn what the flexbox properties do, it's important to understand the associated terminology. CSS that can be applied to the container display: flexbox | inline-flex įlex-direction: row | row-reverse | column | column-reverse

Here is a list of all the CSS flexbox properties that can be used to position elements in CSS.

The article includes helpful animated gifs from Scott Domes which will make flexbox even easier to understand and visualize. By the end of this guide, you'll be ready to start using flexbox in your web projects.

It's easy to learn, is supported in all modern browsers, and it doesn't take that long to figure out the basics. It makes responsive design easier.ĬSS flexbox is great to use for the general layout of your website or app. Items will "flex" to different sizes to fill the space. Flexbox makes it simple to align items vertically and horizontally using rows and columns. This comprehensive CSS flexbox cheatsheet will cover everything you need to know to start using flexbox in your web projects.ĬSS flexbox layout allows you to easily format HTML.
