Design comparison
Solution retrospective
I didn't add any of main landmarks as the document is kinda a component not a full landing page
Community feedback
- @seanaverillPosted over 1 year ago
You could use
position: absolute;
withtop: 50%;
left: 50%
andtransform: translateX(-50%) translateY(-50%);
to center the whole main div that contains the element. Also even when creating just a module, it is still best practice to use landmarks if it is being published alone. In this case you could wrap it in a<main>
tag and then apply the CSS I mentioned to that tag to get proper positioning.1 - @islamabozeedPosted over 1 year ago
noted, I centered it by only margin, that's why I seems without using position thanks for your comments and I'll improve in further designs.
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