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 using HTML and CSS

P
QuentinPettonβ€’ 200

@QuentinPetton

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


What are you most proud of, and what would you do differently next time?

Flexbox

What challenges did you encounter, and how did you overcome them?

Responsive

What specific areas of your project would you like help with?

Mobile version

Community feedback

@MelvinAguilar

Posted

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

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

Metadata πŸ—ƒοΈ:

  • The viewport meta tag is missing. the viewport meta tag is used to control the layout of the page on mobile devices. Add the viewport meta tag to the <head> tag: <meta name="viewport" content="width=device-width, initial-scale=1.0">.

    You can check your solution on a mobile device to see how your solution is distorted by not using this tag. ⚠️

Alt text πŸ“·:

  • To make the alt attribute as useful and effective as possible, avoid using words such as "image", "photo", or "picture" as they are redundant because the image tag already conveys that information. Instead, try to make the description as human-readable and understandable as possible.

    The alt attribute should explain the purpose of the image, for example, in the case of a QR code, a description like "qr code to frontendmentor.io" would be more appropriate.

    If you want to learn more about the alt attribute, you can read this article. πŸ“˜.

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

  • Use align-items: center; and min-height: 100vh; to center the component.

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

Happy coding!

Marked as helpful

1

P
QuentinPettonβ€’ 200

@QuentinPetton

Posted

Thank you @MelvinAguilar for this very comprehensive response and the additional ressources ! I was able to make the improvements. Have a great evening !

1
Daniel πŸ›Έβ€’ 44,230

@danielmrz-dev

Posted

Hello @LeMovet!

Your project looks great!

I have two very simple suggestions for you to improve it:

You can center your card just by making these two minor changes in your code:

  • First, add this to the body:
body {
    height: 100vh;
    align-items: center;
}
  • Then add this to the div.qr-code
qr-code {
   margin: auto;
}

Those minor changes will help you to place your card in the middle of the page.

I hope it helps!

Other than that, you did an excelent job!

Marked as helpful

0

P
QuentinPettonβ€’ 200

@QuentinPetton

Posted

Hello @danielmrz-dev and thank you for your feedback and explanations. I've made the necessary modifications that should result in a better display. See you soon!

1
Daniel πŸ›Έβ€’ 44,230

@danielmrz-dev

Posted

@LeMovet

I'm glad I could help! 😊

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