Design comparison
Solution retrospective
trying to center the div of the main container gave me quite the problem also the sizing of the image I am always unsure of what to do. any suggestions would be appreciated alot
Community feedback
- @MamoutyPosted over 2 years ago
The body of your component is bit too wide try making it a bit narrower as in the image from the folder. As for the QR code image you set its width or height according to the width of the component's body. So if for example you've set its width to 300px, then set the width of the QR code image to 270px and then set its margin to 15px to center it. 15px is the result of (300px - 270px)/2 .
0@preciousoduhPosted over 2 years ago@Mamouty thank you very much, this explains a lot. thank you
1 - @preciousoduhPosted over 2 years ago
Oh thank you very much , I don't have access to the figma file. Thank you very much for the feedback will try it
0 - Account deleted
Are you able to use the figma file? It should tell you the size of the image. also, try using margin-left for the photo. Not sure what pixels to use, but just give it a shot. I had that problem with mines and used margin-top.
0
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