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 card

keziarktsβ€’ 370

@keziarkts

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


Hi everyone,

Maybe I'm a bit too much in perfectionism but hey, we're here to do our best to respect the original design. So I had a hard time to find a nice solution that really looks like the original design for the paragraph (if you really pay attention, you will see the difference).

In fact, I tried adding "margin-left/right", padding-left/right" or even adjusting the width... but nothing seems to work to look perfectly like the original πŸ€”β€Š

Any help is welcome^^ Thanks!

Community feedback

@MelvinAguilar

Posted

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

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

  • Right now your solution looks very similar to the screenshot, however, the footer takes up some pixels of height that will make it so that your solution never looks exactly the same. I'm not saying to eliminate it, I'm just saying that it could get very complicated trying to make it exact. What the people recommend is not to focus on making it look similar, but on the quality of the code.

HTML πŸ“„:

  • Use the <main> tag to wrap all the main content of the page instead of the <div> tag. With this semantic element you can improve the accessibility of your page.
  • Use the <footer> tag to wrap the footer of the page instead of the <div class="attribution">. The <footer> element contains information about the author of the page, the copyright, and other legal information.
  • The <br> tag is not a semantic element. If a screen reader user is reading the page, they will hear "line break", which breaks the flow of the content. Instead, use CSS properties like margin, padding or max-width to add vertical space between elements.
  • Since this component involves scanning the QR code, the image is not a decoration, so it must have an alt attribute. The alt attribute should explain its purpose. e.g. QR code to frontendmentor.io

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 πŸ“˜.

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

Happy coding!

Marked as helpful

1

keziarktsβ€’ 370

@keziarkts

Posted

@MelvinAguilar

Hello,

Thank you for your reply! Your suggestions are very helpful to me. I will try to apply them and focus more on providing quality code rather than focusing too much on the visual.

Your feedback encourages me to get better at coding! Thanks 😊

1
Ahmed Mahrousβ€’ 980

@AhmedMahrouss

Posted

good jop my bro Congrats on completing your challenge!🎊🍻If you have any questions or need further clarification, feel free to reach out to me. Happy Coding! πŸŽ†πŸŽŠ

0

keziarktsβ€’ 370

@keziarkts

Posted

@amahrous176 thank you! I'm keeping in mind your offer of help πŸ‘

0
floppitommiiiiiβ€’ 10

@floppitommiiiii

Posted

I also have the same question

0

keziarktsβ€’ 370

@keziarkts

Posted

@floppitommiiiii yeees I was so frustrated not to find a solution... but check the answer above ^^

So I think it's ok, we don't have to focus on the visual but on the quality of the code πŸ˜‰

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