Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hello there ๐. Good job on completing the challenge !
I have some 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
CSS ๐จ:
- Instead of using pixels in font-size, use relative units like
em
orrem
. The font-size in absolute units like pixels does not scale with the user's browser settings. Resource ๐.
CSS Reset ๐:
-
You should use a CSS reset. A CSS reset is a set of CSS rules that are applied to a webpage in order to remove the default styling of different browsers.
CSS resets that are widely used:
I hope you find it useful! ๐ Above all, the solution you submitted is great!
Happy coding!
Marked as helpful2@KaushalM-2103Posted almost 2 years ago@MelvinAguilar Thanks for the tips i will remember and use it in my next challenges
Happy coding๐!
0 - Wrap the page's whole main content in the
- @HassiaiPosted almost 2 years ago
Replace <div class="QR_CODE"> with the main tag to fix the accessibility issues. click here for more on web-accessibility and semantic html
There is no need to give the body a width value. To center .card on the page using flexbox, replace the height in the body with min-height: 100vh.
For a responsive content replace the width in the img and .qr_code with max-width. Increase the max-width of .qr_code for it to be equivalent to the width of the design.
max-width:300px
Give h1 and p the same font-size of 15px and 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
Marked as helpful0@KaushalM-2103Posted almost 2 years ago@Hassiai
Thank a lot for the details explanation to improve my code
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