Design comparison
SolutionDesign
Solution retrospective
Still dont really get how to center the main div... Any idea?
Community feedback
- @CharlieCastleWebPosted over 2 years ago
Hi Yann! Great work.
The solution I use to center the main content is:
- Give both the html and boyd a height of 100%
- On the body selector apply display: flex, align-items:center, justify-content: center
- Then in order to leave the footer at the bottom you'll need to apply margin-top: auto to both the main and footer selectors.
Hope this works, let me know if you need more help
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