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

Yathish 50

@yathishg

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


hello everyone, this is my first web page. happy to share with u all

open for your advice and suggestions

Community feedback

@nmnjnklc

Posted

Hello @yathishg,

there is no need for margins to center a div or some other element. Just add these properties to its parent element and you are good. For your particular situation:

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

This will also fix width problem on that card. Note that without that height: 100vh property, card would be horizontally centered, but not vertically. Centering card like does not require additional margins, widths, heights etc. to element.

Hope this helps. Happy coding!

Marked as helpful

0

Yathish 50

@yathishg

Posted

@nmnjnklc thnks👍

0

@nmnjnklc

Posted

@yathishg you're welcome!

0

@cvalencia1991

Posted

you should fix the with of the card, also the font size should be more similar to the project and the final thing of the card you have to delete it

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