DEV Community

Discussion on: How to Center a Div with CSS in 3 Steps!

Collapse
 
tobisgd profile image
TobiSGD

To add to that, align-items and justify-content have the shorthand property place-items, so you can replace them with a simple place-items: center; to get down to two lines.

Collapse
 
cat profile image
Cat

Oh, nice! I had no idea place-items existed! Thanks for the tip!