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 Card using HTML and CSS

AdamBtechā€¢ 20

@AdamBtech

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


Would you have tips to make the code more DRY?

Thank you!

Community feedback

AdamBtechā€¢ 20

@AdamBtech

Posted

Hi guys, thank you for your feedback, i have updated the body and removed the margin on the container!

1
Daniel šŸ›øā€¢ 44,230

@danielmrz-dev

Posted

Hello @AdamBtech!

Your project looks great!

I have one suggestion:

šŸ“Œ Don't ever use margin with percentage values to move an element from the borders. Here's a very efficient (and better) way to center the card:

  • Apply this to the body (in order to work properly, don't use position or margins):
body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

I hope it helps!

Other than that, great job!

1
P
Tharindu Dā€¢ 120

@tharidu678

Posted

you can set your body tag style like this..

.body{ display:flex; align-items:center; justify-content:center; height:100vh; }

this may help you to get rid off your scrollbar.

You only need one div in your body tag for this to work.. if you have one or two div s in body tag, put them in a div.

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