Design comparison
Community feedback
- @MelvinAguilarPosted almost 2 years ago
Hi there π. Good job on completing the challenge !
In addition to the other suggestions I have some feedback for you if you want to improve your code.
HTML:
- You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.:
<h1 class="sr-only">QR Card Component</h1>
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. This can cause accessibility issues for users who have set their browser to use a larger font size. You can read more about this here.
- Centering an element with
position: absolute
would make your element behave strangely on some screen sizes, "there's a chance the content will grow to overflow the parent". You can use Flexbox or Grid to center your element. You can read more about centering in CSS here.
- You should use a CSS reset to remove the default browser styles and make your page look the same in all browsers.
Popular CSS resets:
I hope you find it useful! π Above all, the solution you submitted is great!
Happy coding and Happy New Year! πππ
Marked as helpful1@sreedevnairPosted almost 2 years ago@MelvinAguilar Thank you so much man. I really appreciate all the efforts you guys put in to help developers like me learn and grow.
Once again thank you for the feedback and all the info :))
Happy New Year πππ
Cheers !!!
0 - You must use a level-one heading (h1) even though this is not a full-page challenge. You can create an '<h1>' element within your 'main' element that will be hidden visually but visible and readable by screen readers. The class "sr-only" hides content visually and here are the styles to copy. e.g.:
- @HaywayaheadshotPosted almost 2 years ago
Hi Sreedev
Nice work on the project.
I do have one recommendation.
It is very important for the body of the HTML file to have a main tag. Attached below is a link to help you understand this concept more.
Also, the alt attribute in your HTML tag should not be empty. This is because the alt attribute provides alternative information for an image if a user for some reason cannot view it (because of a slow connection, an error in the src attribute, or if the user uses a screen reader).
Happy Coding. And once again, nice work.
Marked as helpful1@sreedevnairPosted almost 2 years ago@Haywayaheadshot Thank you so much for the feedback and the detailed explanation, Abubakar. I really appreciate that :)
Thank You
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