Design comparison
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
- @RodrigoHLCPosted about 1 year ago
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 helpful1
Please log in to post a comment
Log in with GitHubJoin 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