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 HTML and CSS with Flexbox

#accessibility

@Karlof99

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


I am sure the code can be improved. What could make it shorter and cleaner?

Community feedback

Travolgi 🍕 31,480

@denielden

Posted

Hi Carlos, great job! Congratulations on completing the challenge.

I had a look at your solution and I have a few suggestions for you:

  • add main tag and wrap the card for Accessibility
  • try to remove all margin from container class and use flexbox to the body for center the card. Read here -> flex guide
  • also set heigth of body to 100vh because Flexbox aligns to the size of the parent container.

Also avoid assigning specific properties to the div element, rather create a class.

Overall you did well! Hope this help and happy coding!

Marked as helpful

0

@Karlof99

Posted

@denielden Hi Daniel, Thank you very much for your comments. I find them very helpful. I'll modify my code with these reccomendations and others that have been seen to me. Regards

1

@sanketcharanpahadi

Posted

  1. Always wrap your main content inside the <main></main> tag like this
<main><img src="image-qr-code.png" alt="QR code" width="250" height="250"> <p class="p1"><b>Improve your front-end <br> skills by building projects</b></p> <p class="p2">Scan the QR code to visit Frontend <br> Mentor and take your coding skills to <br> the next level</p> </main>

2.don't use inline styles as you have done in the <img> element 3. use relative widths and max-width property. 4. set the font family inside the body element .

Marked as helpful

0

@Karlof99

Posted

@sanketcharanpahadi Hi Sanket, Thank you very much for your comments. I'll modify my code with these reccomendations and others that have been seen to me. I find them very helpful. Regards

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