Design comparison
SolutionDesign
Solution retrospective
I'm struggling to center the content on a desktop viewport, despite trying various methods. Could someone help me?
Community feedback
- @andreiz53Posted over 1 year ago
You could apply max-width on your "main" HTML tag.
Also, for layouts I would recommend using grid instead of flex. You could move your 'header' outside of the 'main' tag, then apply the following on your 'main' tag:
- display:grid,
- grid-template-columns: 1fr 1fr - creates 2 equal columns,
- align-items:center - aligns them vertically.
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