Design comparison
SolutionDesign
Solution retrospective
To make the central container vertically aligned, I used the following CSS on its parent element, the body
tag:
body { margin: 0; min-height: 100%; display: flex; align-items: center; justify-content: center; }
Is this considered a good practice?
P.S.: When I tested it for responsiveness on Edge Dev tools, it seemed to do its job in keeping the main div (the links container) in the middle of the screen as long as the content inside the main div did not itself overflow.
Community feedback
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