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 component

OsujiJr 70

@OsujiJr

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 used my knowledge about flexbox to go about everything, but I faced a challenge when I noticed my barcode was far off from the top of the card. I somehow used a negative value for my margin to get around it. I am not sure if it's the best practice though. .contain img{ margin-top: -80px; } like so.

Community feedback

Rodrigo 480

@RodrigoHLC

Posted

Hey there,

I think the reason why your QR was far from the top is because your .container is set to justify-content:center, that's why you sort of override that with a negative margin-top. I would try using justify-content:space-between so that the top and bottom objects are pushing against the container's top and bottom edges, and then try to separate the QR from the container's edges by giving your .contain element a padding property.

Marked as helpful

1

OsujiJr 70

@OsujiJr

Posted

wow, I appreciate this so much. Noted. @RodrigoHLC

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