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 flex display

Vinitoiderβ€’ 30

@Vinitoider

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

Ted Rinquestβ€’ 440

@climb512

Posted

Just a note to elaborate on the main point of the advice which Boots left you:

Your Flexbox needs to have a height for the content to vertically center inside of.

As it stands, after removing the margin-top: 10vh; hack from .secaoQr your whole layout is just 445px tall, just the size of your content with padding. Making the min-height: 100vh; on the body (or even on just the menuQR div) will give it the full room to center in the page.

This is a very common point of confusion that most Flexbox tutorials do not stress enough.

Happy coding!

2
Aimal Khanβ€’ 2,260

@Aimal-125

Posted

In your css code, increase the height of 120 or 150vh by using media query with max-height: 400px; so that your web app looks good on small heighted screens as mine samsung j3.

1

Vinitoiderβ€’ 30

@Vinitoider

Posted

Like this? @media (max-height: 400px) { body { min-height: 150vh; } }

0
Boots πŸ˜Ίβ€’ 1,590

@adityaphasu

Posted

Hi! Nice job completing the challenge!πŸ™ŒπŸ»

  • You can vertically center the card by applying this to the body:
body {  
min-height: 100vh;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
  • After adding this, be sure to remove margin-top: 10vh from your section and it'll look good!

Happy coding!πŸ•ΊπŸ»

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