Design comparison
Solution retrospective
I think I managed it quite well. No questions shall be asked.
Community feedback
- @VCaramesPosted about 2 years ago
Hey @weakiam, some suggestions to improve you code:
-
The Alt Tag description for the QR image needs to be improved upon. Its needs to tell screenreader users what it is and where it will take them to when they scan it.
-
Remove the
height
from .card, its not needed. Your content itself will create the height. -
Your QR image is not responsive. Add the following to it (this will require you to play around with your margin/paddings)
max-inline-size: 100%; block-size: auto;
Happy Coding!
Marked as helpful1@wiktor-rocksPosted about 2 years ago@vcarames Thank you for all the feedback. I think I wanted to micro manage the card too much and so I added the height too. Thanks again.
0 -
- @correlucasPosted about 2 years ago
👾Hi @weakiam, congratulations on your solution!👋 Welcome to the Frontend Mentor Coding Community!
Great solution and a great start! From what I saw you’re on the right track. I’ve few suggestions for you that you can consider adding to your code:
1.Replace the
<h2>
containing the main title with<h1>
note that this title is the main heading for this page and every page needs one h1 to show which is the most important heading. Use the sequence h1 h2 h3 h4 h5 to show the hierarchy of your titles in the level of importance, never jump a level.2.Clean your code by removing some unnecessary divs, most of the content can stand alone without a div. Use div only for blocks that need a special alignment or the content needs a special positioning.
3.Add a margin of around
margin: 20px
to avoid the card touching the screen edges while it scales down.4.Use relative units as
rem
orem
instead ofpx
to improve your performance by resizing fonts between different screens and devices. These units are better to make your website more accessible. REM does not just apply to font size, but to all sizes as well.5.To maintain the card responsive use
max-width
instead ofwidth
this way you allow the content to be flexible. The difference betweenmax-width
andwidth
is thatwidth
is fixed andmax-width
has a maximum size but can shrink to fit the content.Here's my solution for this challenge if you wants to see how I build it: https://www.frontendmentor.io/solutions/qr-code-component-vanilla-cs-js-darklight-mode-nS2aOYYsJR
✌️ I hope this helps you and happy coding!
Marked as helpful1@wiktor-rocksPosted about 2 years ago@correlucas This is very good feedback so thank you very much. I'll be sure to use these tips on my next challenge. Adding the margin to the scaled down version didn't occur to me because I rushed. Thanks again!
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