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

Andreas Zieglerβ€’ 30

@Andreas-Ziegler22

Desktop design screenshot for the QR code component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@MelvinAguilar

Posted

Hello there πŸ‘‹. Good job on completing the challenge !

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

HTML πŸ“„:

  • Wrap the page's whole main content in the <main> tag.

Alt text πŸ“·:

  • The alt attribute should not contain the words "image", "photo", or "picture", because the image tag already conveys that information.
  • The alt attribute should explain the purpose of the image. Uppon scanning the QR code, the user will be redirected to the frontendmentor.io website, so a better alt attribute would be QR code to frontendmentor.io

    If you want to learn more about the alt attribute, you can read this article. πŸ“˜.

CSS 🎨:

  • Use min-height: 100vh instead of height: 100vh. The height property will not work if the content of the page grows beyond the height of the viewport.

I hope you find it useful! πŸ˜„ Above all, the solution you submitted is great!

Happy coding!

Marked as helpful

2

Andreas Zieglerβ€’ 30

@Andreas-Ziegler22

Posted

@MelvinAguilar thank you for your feedback did not only change as I read also about it spacially the difference between min-height and height.

0
T
Graceβ€’ 29,310

@grace-snow

Posted

In addition to the above excellent feedback you need to

  • use rem for font sizes. Never ever use px for font size line-height or letter spacing. Very important for accessibility
  • remove overflow hidden from the body. You do want to disable scroll on the body. This is why the solution is unusable for me, because it extends beyond my mobile screen but you have hidden that overflow
  • as a general rule as you progress be very careful using element selectors in css. It is much safer to place classes directly on what you want to style. In future projects there will be times where you need to change the html elements and you current approach would mean the css also has to be adjusted. That can be a nightmare to maintain on large projects. It’s much better to decouple concerns and use single class selectors in css. Lower specificity too, an added bonus

Marked as helpful

1

Andreas Zieglerβ€’ 30

@Andreas-Ziegler22

Posted

@grace-snow Hi thank you for your feedback your 3rd paragraph can you give more details or a link that I can have a look

thank you in advance

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