DEV Community

Discussion on: CSS Grid most easy center vertical and horizontal

Collapse
 
madza profile image
Madza

place-items: center was a game-changer for me 😉
I use it all the time, since I love GRID 😉

Collapse
 
dailydevtips1 profile image
Chris Bongers

Can understand why, I'm still in love with flex, just love the easy justify options.
But using place-items more and more.

Collapse
 
richardnikolas profile image
Richard Nikolas
  • Flex is recommended when you're working with just one dimension (X or Y)
  • Grid is better when you have to work with the two dimensions (X and Y)

And it's great to use both together!

Collapse
 
madza profile image
Madza

I like flex for inside components (like header, footer, etc) and grid for general layout 😉

Thread Thread
 
dailydevtips1 profile image
Chris Bongers

Ah good mix indeed!