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 beginner challenge!

Wiktor 110

@wiktor-rocks

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 think I managed it quite well. No questions shall be asked.

Community feedback

@VCarames

Posted

Hey @weakiam, some suggestions to improve you code:

  • The Alt Tag description for the QR image needs to be improved upon. Its needs to tell screenreader users what it is and where it will take them to when they scan it.

  • Remove the height from .card, its not needed. Your content itself will create the height.

  • Your QR image is not responsive. Add the following to it (this will require you to play around with your margin/paddings)

  max-inline-size: 100%;
  block-size: auto;

Happy Coding!

Marked as helpful

1

Wiktor 110

@wiktor-rocks

Posted

@vcarames Thank you for all the feedback. I think I wanted to micro manage the card too much and so I added the height too. Thanks again.

0
Lucas 👾 104,440

@correlucas

Posted

👾Hi @weakiam, congratulations on your solution!👋 Welcome to the Frontend Mentor Coding Community!

Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:

1.Replace the <h2> containing the main title with <h1> note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.

2.Clean your code by removing some unnecessary divs, most of the content can stand alone without a div. Use div only for blocks that need a special alignment or the content needs a special positioning.

3.Add a margin of around margin: 20px to avoid the card touching the screen edges while it scales down.

4.Use relative units as rem or em instead of px to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.

5.To maintain the card responsive use max-width instead of width this way you allow the content to be flexible. The difference between max-width and width is that width is fixed and max-width has a maximum size but can shrink to fit the content.

Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR

✌️ I hope this helps you and happy coding!

Marked as helpful

1

Wiktor 110

@wiktor-rocks

Posted

@correlucas This is very good feedback so thank you very much. I'll be sure to use these tips on my next challenge. Adding the margin to the scaled down version didn't occur to me because I rushed. Thanks again!

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