
Design comparison
Please log in to post a comment
Log in with GitHubCommunity feedback
- @denielden
Hi Mohamed, congratulations on completing the challenge, great job! 😁
Some little tips for optimizing your code:
- add
main
tag and wrap the card for improve the Accessibility - also you can use
article
tag instead of a simplediv
to the container card for improve the Accessibility - to fix the top image in the background just put more specific background properties to the body:
background: url("../img/pattern-background-desktop.svg") no-repeat top center; background-size: contain; background-color: #e0e8ff;
- add descriptive text in the
alt
attribute of the images - remove all unnecessary code, the less you write the better as well as being clearer: for example the
div
container of image - use flexbox to the body to center the card. Read here -> best 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 😉
Marked as helpful - add
- @correlucas
👾Hello Mohamed Hossam, Congratulations on completing this challenge!
I saw your preview site and I liked a lot the work you’ve done here, it's almost complete, I’ve some suggestions you can consider applying to your code:
1.Make your background svg image takes the full width size and cover all bg using
background-size: cover
body { min-height: 100vh; font-family: 'Red Hat Display', sans-serif; background-image: url(../images/pattern-background-desktop.svg); background-repeat: no-repeat; background-color: hsl(225, 100%, 94%); background-size: cover; }
2.Add the correct size to avoid the container growing more than it should. In this case the QR CODE component size is
max-width: 340px
.3.You’ve used
<div>
to wrap the card container, in this case you need to use<main>
since this is the main block of this page.✌️ I hope this helps you and happy coding!
Marked as helpful
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