mikgamer.fr

What is Flexbox ?

Made by Michael PERARD

Flexbox is an HTML layout module, with it you can align, justify and set the direction of your content.

To use this layout a container is required, instead of beeing a block or inline, he is going to be flex.

display:flex; align-items:center; justify-content:center;

flex-direction

This property set direction of the items in the container.

display:flex; flex-direction:column; align-items:center; justify-content:center;

Possible values

  • column
  • column-reverse
  • row
  • row-reverse

flex-wrap

This property specifies whether the items in the container wrap or not.

display:flex; flex-wrap:wrap; align-items:center; justify-content:center;

Possible values

  • wrap
  • nowrap
  • wrap-reverse
1
2
3

justify-content

This property is used to justify the items in the container.

display:flex; justify-content:space-between; align-items:center;

Possible values

  • center
  • flex-start
  • flex-end
  • space-between
  • space-around
  • space-evenly

align-items

This property is used to aligns all the items in the container.

display:flex; align-items:flex-end; justify-content:center;

Possible values

  • center
  • flex-start
  • flex-end
  • baseline
  • stretch

align-content

This property is used to aligns the lines of items in the container.

display:flex; align-content:flex-start; flex-wrap:wrap; align-items:center;

Possible values

  • center
  • flex-start
  • flex-end
  • space-between
  • space-around
  • space-evenly
1
2
3
flex-direction flex-wrap justify-content align-items align-content
flex-direction:
flex-wrap:
justify-content:
align-items:
align-content:
1
2
3
4
5
6
7
8
9