Hi @SLAKS97! Congrats on completing the project!
Shots in the dark sometimes hit the target :) Just kidding!
Yes, that is one of the ways to center a container on the page, setting the body as a flex container. align-items: center
will center your container vertically (by default). The height of your body is dictated by the height of your container. In this case, your container is high enough so you can even omit min-height: 100vh
on the body, it'll be the same. You want to use min-height: 100vh
on the body when your container is less high. In this way, it'll be perfectly centered vertically in the middle of the screen.
Horizontally you'll use justify-content: center
(by default) to center your container on the page. In your case, it's not necessary since you're having margin: 0 auto
on the container, which does the same thing.
You can even remove display: flex
and align-items: center
and min-height: 100vh
on body and you'll get the same result (try it out).
As for the width, you don't have to set the width: 100%
(especially not in px). By default, body, divs, and all the other block elements already have the width 100%, meaning all the available width of the screen.
Hope some of this makes sense. Good luck!