@MariusG1991
Posted
Hi,
Easier way to center everything is using flexbox or grid, I will show u both solutions:
First one
body{
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh;
}
Second
body{
display: grid;
place-items: center;
min-height: 100vh;
}
If you use one of this, you can remove position absolute,top,left,transform
from your body selector ;)
Marked as helpful
@sarahhetman
Posted
@MariusG1991 Thank you! I remember learning flexbox but it is definitely something I need to work on.