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-card

Giovanniβ€’ 30

@MagnificoRettore

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

Lucas πŸ‘Ύβ€’ 104,420

@correlucas

Posted

πŸ‘ΎHi Giovanni, congratulations for your first solution!πŸ‘‹ Welcome to the Frontend Mentor Coding Community!

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

Your component is perfect, but is not responsive yet, this is due the fixed width you've applied to the container.

Look both width and max-width the main difference between these properties is that the first(width) is fixed and the second(max-width) is flexible, for example, a component with width: 320px will not grow or shrink because the size will be ever the same, but a container with max-width: 320px or min-width: 320px can grow or contract depending of the property you've set for the container. So if you want a responsive block element, never use width choose or min-width or max-width.

Note that there's no need to use height here, because since you set a height for an element, this means that this element will grow until a certain point and after that the inner content (as texts or images) will start to pop out the element due its fixed height, so isn't necessary to set the height the container height comes from the elements, its paddings and height.

✌️ I hope this helps you and happy coding!

Marked as helpful

0
Travolgi πŸ•β€’ 31,420

@denielden

Posted

Hi Giovanni, congratulations on completing the challenge, great job! 😁

Some little tips for optimizing your code:

  • remove height and padding properties from main tag
  • you can use article tag instead of a simple div to the container card for improve the Accessibility
  • remove all unnecessary code, the less you write the better as well as being clearer: for example the figure container of image
  • remove all margin from card class
  • use flexbox to the body to center the card. Read here -> best flex guide
  • after, add min-height: 100vh and margin: 0 to body because Flexbox aligns child items to the size of the parent container
  • instead of using px use relative units of measurement like rem -> read here

Hope this help! Happy coding πŸ˜‰

Marked as helpful

0

Giovanniβ€’ 30

@MagnificoRettore

Posted

@denielden Thank you for your support!! Now I adjust all the code πŸ˜„

1
Travolgi πŸ•β€’ 31,420

@denielden

Posted

@MagnificoRettore You are welcome and keep it up :)

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