Responsive results summary component using css grid and flexbox

Solution retrospective
Any feedback is welcome!
I am still an early beginner in web development. I want to center the component in the center of the page but was unable to so any help would be great.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @RubenSmn
Hi RoboXGamer, nice job on this new challenge!
To align your element in the center you could use flexbox.
Here is a code snippet you can use, the
min-height
makes sure we set the body to the whole vertical screen height. And then we apply the flexbox styles.justify-content
centers the items horizontally andalign-items
centers them vertically.body { min-height: 100vh; display: flex; justify-content: center; align-items: center; }
Hope this is helpful and happy hacking!
Join 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