DEV Community

Discussion on: Center Element Using CSS

Collapse
flyingduck92 profile image
Sekti • Edited on

You also can center using Grid with

display: grid; 
place-content: center;

place-content: center is the shorthand of align-items: center and justify-content: center

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