CSS Flexbox cheatsheet

These CSS rules go inside a flex container (the element containing the boxes to be aligned).

The flex container can be a block or an inline-block element: display: flex; or display: inline-flex;.

The properties with their possible values are a summary of the most-used:

justify-content: horizontal

align-items: and align-self: vertical

flex-direction: order

flex-wrap: row wrapping

Example

.my-class {
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  flex-direction: column;
}

References

Source code for this cheatsheet