Mohammed Lahboub• 570
@mohammedlahboub
Posted
To Center a something You can use display: flex on the parent container like this:
.body{
width: 100vw; to make body width equal to screen width
height: 100vh; to make body height equal to screen height
display: flex; set display mode for body as flex
align-items: center; to center items inside the body vertically
justify-content: center; to center items inside the body horizontally
}
Hope this helps
2