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 Scanner

Sreedev Nairβ€’ 10

@sreedevnair

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

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

In addition to the other suggestions I have some feedback for you if you want to improve your code.

HTML:

  • You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.: <h1 class="sr-only">QR Card Component</h1>

CSS:

  • Instead of using pixels in font-size, use relative units like em or rem. The font-size in absolute units like pixels does not scale with the user's browser settings. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here.
  • Centering an element with position: absolute would make your element behave strangely on some screen sizes, "there's a chance the content will grow to overflow the parent". You can use Flexbox or Grid to center your element. You can read more about centering in CSS here.
  • You should use a CSS reset to remove the default browser styles and make your page look the same in all browsers.

Popular CSS resets:

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

Happy coding and Happy New Year! πŸŽ‰πŸŽŠπŸŽ

Marked as helpful

1

Sreedev Nairβ€’ 10

@sreedevnair

Posted

@MelvinAguilar Thank you so much man. I really appreciate all the efforts you guys put in to help developers like me learn and grow.

Once again thank you for the feedback and all the info :))

Happy New Year πŸŽπŸŽ‰πŸŽ‡

Cheers !!!

0
Abubakar Ummarβ€’ 220

@Haywayaheadshot

Posted

Hi Sreedev

Nice work on the project.

I do have one recommendation.

It is very important for the body of the HTML file to have a main tag. Attached below is a link to help you understand this concept more.

Details about HTML semantics

Also, the alt attribute in your HTML tag should not be empty. This is because the alt attribute provides alternative information for an image if a user for some reason cannot view it (because of a slow connection, an error in the src attribute, or if the user uses a screen reader).

Happy Coding. And once again, nice work.

Marked as helpful

1

Sreedev Nairβ€’ 10

@sreedevnair

Posted

@Haywayaheadshot Thank you so much for the feedback and the detailed explanation, Abubakar. I really appreciate that :)

Thank You

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