Design comparison
Community feedback
- @MelvinAguilarPosted over 1 year ago
Hello π. Congratulation on successfully completing your first challenge π ! !
I have some recommendations regarding your code that I believe will be of great interest to you.
HTML π·οΈ:
- Since this component involves scanning the QR code, the image is not a decoration. You must not use the background-image property to add the QR code image. Instead, use the
<img>
tag to add the image. Use the background-image property only for decorative images that do not add any information to the page.
CSS π¨:
-
Setting the font-size to 62.5% can attract compatibility issues with third-party libraries or plugins. You can read more about this with this lectures:
- 1. Should I change the default HTML font-size to 62.5%?.
- 2. The Surprising Truth About Pixels and Accessibility - The 62.5% trick.
- 3. A comment on the 62.5% trick.
Credit to grace-snow and vanzasetia.
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding!
Marked as helpful2@KuzitaaPosted over 1 year ago@MelvinAguilar I didn't know about the difference between using the img tag and the background image property. Really thanks!
0 - Since this component involves scanning the QR code, the image is not a decoration. You must not use the background-image property to add the QR code image. Instead, use the
- @frank-itachiPosted over 1 year ago
Hello there π. You did a good job!
I have some suggestions about your code that might interest you.
HTML π:
- The heading order is important in the html structure so try to always start your headings and/or titles with an
<h1>
tag and then you can decrease by one if you need to use more headings in your html code.
CSSπ¨:
You can use grid or flexbox to center the content no matter the viewport size. Since I use grid to achieve such purpose, you can do the following:
body { min-height: 100vh; display: grid; align-items: center; justify-content: center; }
As I said, you can use flexbox to center the content and it will work as well.
body { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
I hope you find it useful! ππ Above all, the solution you submitted is greatπ!
Happy
<coding />
π!Marked as helpful2 - The heading order is important in the html structure so try to always start your headings and/or titles with an
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