qr-code component

Please log in to post a comment
Log in with GitHubCommunity feedback
- @romila2003
Hi John,
Congratulations for 🎉 for completing your first challenge, the card looks great. It is great that you used the right semantics. There are some issues I want to address:
- I would suggest you change the
margin
property since the card becomes too narrow in mobile screen. Instead, I would recommend you to change it tomargin: 0 10px
as it will not give your top and margin, a margin and will only give the side of the screen and card, a margin of 10px on both sides. This will prevent the card from touching the side of the screen. - The reason why your card is not centering in the middle of the screen, is because, the
main
tag has aheight
of75h
. It will center in the middle, if it has the value of100vh
. However, when you do that, it will cause the footer to be screen, where there will be an overflow and you would have to scroll just to see the footer. Therefore, I would recommend you giving yourbody
theflex
property, to center everything e.g.
body { display: flex; align-items: center; justify-content: center; min-height: 100vh; flex-direction: column; overflow: hidden; }
Overall, great attempt and wish you the best for your future projects so keep coding 👍.
Marked as helpful - I would suggest you change the
- @Jonnie-Dev
Thanks for your suggestions, all taken and applied
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