Flexbox CSS

The CSS Flexible Box Layout Module simplifies the creation of flexible responsive layout structures without the use of floats or positioning. When we say flexbox is one-dimensional, we are referring to the fact that it only works with one dimension at a time — either a row or a column.

PropertyValues
displayflex | inline-flex
flex-directionrow | row-reverse | column | column-reverse
flex-wrapnowrap | wrap | wrap-reverse
justify-contentflex-start | flex-end | center | space-between | space-around | space-evenly
align-itemsflex-start | flex-end | center | stretch | baseline
align-contentflex-start | flex-end | center | stretch | space-between | space-around
align-selfauto | flex-start | flex-end | center | baseline | stretch
flex-growvalue - default 0
flex-shrinkvalue - default 1
ordervalue - default 1

display

.container {
    display: flex | inline-flex;
  }
flexbox-display

flex-direction

.container {
    flex-direction: row | row-reverse | column | column-reverse;
  }
flexbox-flex-direction

flex-wrap

.container {
    flex-wrap: nowrap | wrap | wrap-reverse;
  }
flexbox-flex-wrap

justify-content

.container {
    justify-content: flex-start | flex-end | center | space-between | space-around | space-evenly;
  }
flexbox-justify-content
justify-content-example

align-content

.container {
    align-content:flex-start | flex-end | center | stretch | space-between | space-around;
  }
flexbox-align-content

align-item

.container {
    align-items: flex-start | flex-end | center | stretch | baseline;
  }
flexbox-align-item

align-self

.item {
    align-self: auto | flex-start | flex-end | center | baseline | stretch;
  } 
flexbox-align-self

flex-grow

.item {
    flex-grow: 2; /* default 0 */
  }
flexbox-flex-grow

flex-shrink

.item {
    flex-shrink: 4; /* default 1 */
  }
flexbox-flex-shrink

order

.item {
    order:2; /* default 1 */
  }
flexbox-order