Submitted almost 2 years ago
Responsive results summary component using css grid and flexbox
@RoboXGamer
Design comparison
SolutionDesign
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.
Community feedback
- @RubenSmnPosted almost 2 years ago
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!
0
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