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: Innovation and Functionality

alchrdev 170

@alchrdev

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

P

@Islandstone89

Posted

Good job!

Here are some suggestions:

HTML:

  • The alt text must also say where it leads(frontendmentor website). Don't include words like "image" or "photo", as screen readers automatically announce it as an image. A good alt text would be "QR code leading to the Frontend Mentor website."

  • Use <p> for the footer text.

CSS:

  • You don't need to set font-size on html, as 100% is the default value.

  • I like to add 1rem of padding on the body, to ensure the card doesn't touch the edges on small screens.

  • Remove max-width on body.

  • I would move the properties on main to body, and add flex-direction: column and gap: 2rem.

  • Remove all widths and heights in px. We rarely want to set fixed sizes - the content should be able to adapt to all screen sizes.

  • Add a max-width of around 20rem on the card, to prevent it from getting too wide on larger screens.

  • Since all of the text should be centered, you only need to set text-align: center on the body, and remove it elsewhere. The children will inherit the value.

  • As the design doesn't change, there is no need for any media queries. When you do need them, they should be in rem, not px.

Marked as helpful

0

alchrdev 170

@alchrdev

Posted

@Islandstone89 Hello! I greatly appreciate your valuable comments. They have been of great help for my growth and continuous improvement. I have incorporated all your suggestions into a new commit and I am very satisfied with the changes. I am always open to learning and improving, so if you have more observations on this or some of my other challenges, I will be delighted to read them. Thank you again for your time and help

1
P

@Islandstone89

Posted

@alchrdev Happy to help :) You did great!

You can remove min-height: 100vh, as you already have min-height: 100svh.

You can also remove the font-size on.card-desc - it is a <p>, meaning 1rem is its default value.

Finally, you don't need to declare height: auto on the image.

Keep up the excellent work :)

Marked as helpful

0
alchrdev 170

@alchrdev

Posted

@Islandstone89 You’re great too! I will continue to work hard to improve every day more. :)

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