Design comparison
SolutionDesign
Solution retrospective
What are the best practices that I missed?
Is my way of centering a div a correct or optimal way?
Community feedback
- @VCaramesPosted about 1 year ago
Hey there! 👋 Here are some suggestions to help improve your code:
Regarding your question about centering:
To properly center your content to your page, you will want to add the following to your
body
(this method uses CSS Grid):body { min-height: 100vh; display: grid; place-content: center; }
More Info: 📚
- One crucial element missing from your code, which should always be included, whether it's a component or a full website, is the
main
element. Its presence is essential for maintaining good semantics and accessibility, as it assists in identifying the primary content of your site.
- The
alt
tag for the QR image requires improvement, as its current content doesn't convey where it leads when scanned. It should provide a clear indication of the destination for users who scan it.
- "Improve your front-end skills by building projects" is a heading, so it should be wrapped in a heading element.
- Currently, your content is not responsive and this is due to your use of
width
on the container of the card. You instead want to usemax-width
.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! 👾
Marked as helpful0 - One crucial element missing from your code, which should always be included, whether it's a component or a full website, is the
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