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

Fernando Calligoโ€ข 60

@FernandoCalligo

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

@MelvinAguilar

Posted

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

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

  • 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. Source ๐Ÿ“˜.
  • The width: 100vw property in the body tag is not necessary. The body tag is a block element and it will take the full width of the page by default.
  • Use min-height: 100vh instead of height: 100vh. The height property can cause your component to be cut off on small screens, such as a mobile phone in landscape mode.

    Here is an image of how it would look on a mobile device (taking into account the scroll): https://i.imgur.com/jlw7mvg.png

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

Happy coding!

Marked as helpful

1
Hassia Issahโ€ข 50,670

@Hassiai

Posted

There is no need to give the body a width value.

To center .container on the page using flexbox, replace the height in the body with min-height: 100vh.

For a responsive content that wont require a media query for this challenge, replace the width in .container with max-width value . Use the value you gave to .container in the media query that is equivalent to the width of design. max-width:22rem.

Give h1 and p the same font-size of 15px which 0.9375rem, text-align: center, the same margin-left, margin-right and margin-top values. Give p a margin bottom value.

Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here

Hope am helpful.

Well done for completing this challenge. HAPPY CODING

Marked as helpful

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