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

Flex-box and Media query

@Yoseif-Alfiky-1

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


All opinion is acceptable , Tell me what do you think i did it wrong to improve myself. Good luck for every body

Community feedback

Dan 300

@dtp27

Posted

Hi Yoseif!

Great solution! Another way to center your component, because you're actually really close with using Flexbox in the body, is to add min-height: 100vh;. This will make sure the body takes up the entire viewing area, which will result in Flexbox centering the component in the view.

One thing I would caution about using fixed position is that it takes the element out of normal flow and can cause interesting and unintended side effects when dealing with more components on the page.

Happy coding!

Dan

Marked as helpful

0
raionus 310

@sinjin25

Posted

There's a style-guide.md included in the files you downloaded. Those can help you get the correct font and text colors for the project.

You're using a serif font which usually looks bad for ui components like this.

You can use this snippet on the card to center your work on the page so that the design comparison slider lines up better:

    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);

That will put it in the center of the page

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