Design comparison
Community feedback
- @VCaramesPosted about 2 years ago
Hey there! 👋 Here are some suggestions to help improve your code:
-
To better identify the main content of you site you will want to encase your entire component inside a Main Element.
-
To center you content to your page, add the following to your Body Element:
body { min-height: 100vh; display: grid; place-content: center; }
- For this challenge you want to use the Picture Element not the Background Image Property. The Background Image Property is mainly used on decorative images
Picture Element will allow your to switch between images in different breakpoints and makes your site load faster by saving bandwidth.
Here is an example of how it works: EXAMPLE
Syntax:
<picture> <source media="(min-width: )" srcset=""> <img src="" alt=""> </picture>
More Info:
https://www.w3schools.com/html/html_images_picture.asp
https://web.dev/learn/design/picture-element/
- The old price 🏷 is not being announced properly to screen readers. You want to wrap it in a Del Element and include a sr-only text explaining that this is the old price.
If you have any questions or need further clarification, let me know.
Happy Coding! 👻🎃
Marked as helpful0@Moses-anidugbePosted about 2 years ago@vcarames Please i don't understand what you meant by the old price is not being announced properly to screen readers
0@VCaramesPosted about 2 years ago@Moses-anidugbe
So currently, is you use a screen reader/voice over on you computer/cell phone, it will say "149.99" and "169.99".
For you and me we can tell that which one is which since we can "see" the price and strikethrough.
But for those that use the a screen reader cannot see what we see. They only hear two different prices. So adding an "sr-only" text which states "this is the old price". It will clarify which price is which.
Marked as helpful0@Moses-anidugbePosted about 2 years ago@vcarames Thank you. I'll keep that in mind.
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