Design comparison
SolutionDesign
Community feedback
- @nachoNotaPosted 9 months ago
hi, if you want to put the container in the middle of the page you have to give the body a min-height, and also add justify-content: center, like this:
body{ display: flex; flex-direction: column; justify-content: center; align-items: center; min-height: 100vh; }
or you can also use grid, like this:
body{ display: grid; place-items: center; min-height: 100vh; }
Marked as helpful1
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord