Design comparison
Solution retrospective
It was easy but I just found one difficulty when I was centering the white card or the <div> that carries the qr, But I found the solution by searching in google.
I am not sure about the centering of the white card or the <div> that carries the qr.
Community feedback
- Account deleted
Hey Hasan, congratulations on completing the challenge! You did a great job 😉
Let me give you some little tips for optimizing your code:
- add
main
tag and wrap the card for improve the Accessibility - add descriptive text in the
alt
attribute of the images - centering a
div
withabsolute
positioning is now deprecated, it uses modern css likeflexbox or grid
- remove all
margin
fromwhite-card
class - use flexbox to the body to center the card. Read here -> flex guide
- after, add
min-height: 100vh
to body because Flexbox aligns child items to the size of the parent container - instead of using
px
use relative units of measurement likerem
-> read here
Hope this help! Happy coding 😁 by Travolgi
Marked as helpful1@HasanWaelPosted over 2 years ago@travolgi I think now the code is a lot better, take a look.
1Account deleted@HasanWael now it's much better! Great work keep it up :)
0 - add
- @satyammjhaPosted over 2 years ago
Great solution @HasanWael You can center the QR by using
align-item: center
to the CSS of the div containing the QR. Hope it will help you.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