By Chen Hui Jing / @hj_chen
Image credit: Jyotika Sofia Lindqvist
float
Item A
Item B
Item C
inline-block
Item A
Item B
Item C
flex
Another flex item
All direct children of the flex container become flex children
flex
propertygrid
Item A
Item B
Item C
Item D
Item E
Item F
No, just kidding. It's just that alignment really ties it all together.
Property | Axis | Aligns | Applies to |
---|---|---|---|
justify-content |
main/inline | content within element |
block containers, flex containers and grid containers |
align-content |
cross/block | ||
justify-items |
inline | items inside box |
block containers and grid containers |
align-items |
cross/block | flex-containers and grid-containers |
|
justify-self |
inline | element within parent |
block-level boxes, absolutely-positioned boxes and grid items |
align-self |
cross/block | absolutely-positioned boxes, flex items and grid items |
Font is Bitter by Huerta Tipografica.
Sunflower illustration by pikisuperstar