Design comparison
SolutionDesign
Solution retrospective
Centring the area was the difficult topic.
Community feedback
- @ag7621Posted almost 2 years ago
Hello!
Although I'm new to web dev myself, the method I've been using is to set the
html, body
to a height of100%
in my css reset to ensure the parent takes the full height of the page first. Next on your code, you can set thebody
tobody { display: flex; flex-direction: column; justify-content: center; }
That should center your card in the middle of the page. This resource has helped me lots in learning how to use flexbox CSS Tricks - Flexbox. Hope this helps! Happy Coding!
-Aaron
Marked as helpful0
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