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 example w/ adaptive image and text sizing

alexcom23 10

@alexcom23

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


Obviously, this was a fairly easy coding task but I would like to improve on anything if necessary. I wish to be exceptional at frontend development so any suggestions on best coding practices that I should implement or any other improvements would be greatly appreciated!

Community feedback

Muhammadh 1,140

@Mr-jaw

Posted

Hey there 👋

well done on completing the challenge

HTML 📄

  • replace <div class="qr-component"> with the main tag, And <div class="attribution"> with a footer tag to fix accessibility issues.

CSS 🎨

  • give the image a max-width of 90% instead of just width
img {
      max-width: 95%;
}
  • Also Always give meaningful and humanly understandable descriptive text about what the image is about in the alt attribute. it also will reduce some accessibility issues

  • rather than using px which is an absolute unit. Use em or rem for margins, paddings, width, and height. most probably rem for font sizes to make it more responsive

Also, you had a best practice of using CSS custom properties which is great.

I hope this was useful 😊

KEEP IT UP

Marked as helpful

1

@mhap75

Posted

Hello alexcom23! Congratulations on entering the front-end field! Some suggestions for making your solutions better:

  • You don't have to upload /design and README-template.md to your repository.
  • Make your code more accessible by using semantic HTML.
  • For parent elements like body it's better to use display: grid; which gives more control over its child elements.
  • Keep in mind there is a principle called DRY. Its for all types of coding.

Happy coding! ( ͡ᵔ ͜ʖ ͡ᵔ )

Marked as helpful

1

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