CSS Flexbox Cheatsheet
Settings
Select the directionality to be used in the interactive playgrounds. (Learn more)
Flex Container
Flex flow (shorthand)
Flex direction
flex-direction: row;
flex-direction: row-reverse;
flex-direction: column;
flex-direction: column-reverse;
Try it out
dir="ltr"
One
Two
Three
Four
Flex wrap
flex-wrap: nowrap;
flex-wrap: wrap;
flex-wrap: wrap-reverse;
Try it out
dir="ltr"
One
Two
Three
Four
Five
Six
Seven
Eight
Justify content
justify-content: flex-start;
justify-content: center;
justify-content: flex-end;
justify-content: space-between;
justify-content: space-around;
justify-content: space-evenly;
Try it out
dir="ltr"
One
Two
Three
Four
Align items
align-items: stretch;
align-items: flex-start;
align-items: center;
align-items: flex-end;
align-items: baseline;
Try it out
dir="ltr"
One
Two
Three
Four
Align content
align-content: stretch;
align-content: flex-start;
align-content: center;
align-content: flex-end;
align-content: space-between;
align-content: space-around;
Try it out
dir="ltr"
One
Two
Three
Four
Five
Six
Seven
Eight
Flex Item
Order
order: 0;
Flex (shorthand)
Flex basis
flex-basis: auto;
Align self
align-self: auto;
align-self: flex-start;
align-self: center;
align-self: flex-end;
align-self: baseline;
align-self: stretch;
Try it out
dir="ltr"
One
Two
Three
Four
Five