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


I found difficulty to define the space margin or padding on top with Web view. Mobile View is fine. Also, I'm not sure what is the best practice for define font size.

Community feedback

joelsavio 50

@joelsavio

Posted

Hi morifusa, your design output is good. I think the problem is with alignment of the container. You can check how to center a element on w3school by click this link. They have shown different ways to do it. I usually do with flexbox. I have completed the same challenge. You can see my solution here.

  • The best practice to define font size is using em or rem. Again you can check this page on w3school
0

@mftaskin

Posted

For the designs like that I generally prefer to use flex for my body tag. You can use the css below for your body tag.

display: flex;
justify-content: center;
align-items: center;

And you can set margin: 0; for your .container class, because it will be centered in your body tag.

You can check my solution. Same logic.

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