Challenge solution - QR code component | HTML | CSS

Please log in to post a comment
Log in with GitHubCommunity feedback
- @MelvinAguilar
Hello there 👋. Good job on completing the challenge !
I have other suggestions about your code that might interest you.
HTML 📄:
- Wrap the page's whole main content in the
<main>
tag.
- Since this component involves scanning the QR code, the image is not a decoration, so it must have an
alt
attribute. Thealt
attribute should explain its purpose. e.g.QR code to frontendmentor.io
I hope you find it useful! 😄 Above all, the solution you submitted is great!
Happy coding!
- Wrap the page's whole main content in the
- @Hassiai
Replace the section tag with the main tag to fix the accessibility issue.
there is no need to give the body a width value. The body has a wrong background-color. Use the colors that were given in the styleguide.md found in the zip folder you downloaded.
To center the section/main on the page using flexbox, replace the height in the body with min-height: 100vh.
Reduce the width and padding value of the section for it to be equivalent to the width of the design.eg:
width: 320px
. There is no need for the height in the section. Give the img a max-width of 100% instead of a width and height value.Give h1 and p the same font-size of 15px, text-align: center, the same margin-left, margin-right and margin-top values. Give p a margin bottom value.
Use relative units like rem or em as unit for the padding, margin, width values and preferably rem for the font-size values, instead of using px which is an absolute unit. For more on CSS units Click here
Hope am helpful.
Well done for completing this challenge. HAPPY CODING
- @PvBlackSins
Thanks for the help, I made some changes according to your tips and I think it improved a lot! But I still need some studies to make it more perfect, because I still haven't been able to faithfully represent the project
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