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

Tomomi 20

@Tomomi-K1

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

_nehal💎 6,710

@NehalSahu8055

Posted

Hello Coder 👋.

Congratulations on successfully completing the challenge! 🎉

Few suggestions regarding design.

  • Never use stylings on html styling starts from body.

  • To properly center the card

  • USING FLEXBOX

body{  
    display: flex;
    flex-direction: column; (as there are 2 elements main and footer)
    justify-content: center;
   align-items: center;
   min-height: 100vh;
}
  • For non-decorative images give meaningful and descriptive alt like alt= "QR code to frontend mentor website".

I hope you find this helpful.

Happy coding😄

1

Tomomi 20

@Tomomi-K1

Posted

Hi @NehalSahu8055 Thank you so much for taking your time to look over my solution. I have implemented your suggestions. I have a quick question. Why would we use min-height: 100vh instead of just height:100vh?

1
_nehal💎 6,710

@NehalSahu8055

Posted

  • Setting the height: 100vh may result in the component being cut off on smaller screens, such as mobile devices in landscape orientation.
  • For example; if we set height: 100vh then the div will have 100vh height no matter what. Even if the content spans more than 100vh of viewport.
  • But if we set min-height: 100vh then the div will start at 100vh, if the content pushes the div beyond 100vh it will continue growing.
  • However if you have content that takes less than 100vh it will still take 100vh in space.

Marked as helpful

0
Tomomi 20

@Tomomi-K1

Posted

@NehalSahu8055 Thank you so much for the helpful information!🙌🏻

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