Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

QR code component using CSS Flexbox

#accessibility

@Virtuoso-fatahi

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


How can I write better css code using the best practices?

Community feedback

@AGutierrezR

Posted

Hello there 👋. Good job on completing the challenge!

I have some suggestions about your code that might interest you.

General Structure and HTML:

  • Wrap the primary content within the <main> tag instead of using it as a standalone component like a <div>.
  • All the content should be contained within landmarks. Every page minimally needs a <main> element.

CSS and Styling:

  • Avoid using px for font-size, you could read this article to learn why. Letter spacing and line height must not be in px, use rem for all the font-related properties.
  • Let the content decide the height of the elements. Use padding and margins strategically for this purpose.
  • The body should not have its height limited. Instead of using height: 100%, use min-height: 100vh.

I hope you find this helpful 😁. Most importantly, your submitted solution is fantastic!

Happy coding!

Marked as helpful

0

@Virtuoso-fatahi

Posted

@AGutierrezR Thanks for your precise feedback. I really appreciate.

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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