Basic HTML & CSS approach - first Flexbox project
Design comparison
Solution retrospective
It has been a few years since I have written HTML & CSS, so I decided to mostly use basic CSS properties while practicing Flexbox layouts. This project was a great way to get some of the rust out of the way, and I look forward to diving into some more projects. I didn't want to spend too much time on this project, so there is definitely some refactoring and semantic changes that I could make. Please let me know if there are any major faults or bad practices with my approach. Thanks!
Community feedback
- @NikolaD93Posted almost 2 years ago
Hello there! π
Congrats for completing the challenge! π
The code looks clean and the design is great, looks like you still got it!
I would just not leave the product__image div empty however, but I can see you added an image in CSS later, which is not bad also.
Hope this was helpful for you!
Happy holidays! πβ
Marked as helpful1@Ryan-HemrickPosted almost 2 years ago@Nikola1232456 Thank you for the feedback! I look forward to diving into more projects!
Happy holidays!
1 - @VCaramesPosted almost 2 years ago
Hey there! π Here are some suggestions to help improve your code:
- Since the images in this component add value and serve a purpose (displaying the product) it needs to be accessible β οΈ. The image needs to be applied using the
picture
element and not thebackground-image
property, as it will not only let you use different images during different breakpoints it will let apply analt tag
description to image stating what the image is.
- The only heading β οΈ in this component, is the name of the perfume; βGabrielle Essence Eau De Parfumβ . The rest of the text should be wrapped in a
paragraph
element.
- Currently, the old price (169.99) π· is not being properly announced π’ to screen readers. To fix this, you are going to wrap the the price in a
del
element and inside it you will add aspan
element with ansr-only class
that will state something like βThe previous price wasβ¦β and use CSS to make it only visible to screen readers.
More Info:π
- For improved accessibility π for your content, it is best practice to use
em
formedia-queries
. Using this unit gives users the ability to scale elements up and down, relative to a set value.
If you have any questions or need further clarification, feel free to reach out to me.
Happy Coding! πππͺ
Marked as helpful0@Ryan-HemrickPosted almost 2 years ago@vcarames Thank you for all of this feedback! The <picture> element was one that I never really used when I first dove into HTML and CSS back in 2015. I'll do some more studying on all of the info you provided to help give me some more perspective
Thank you!
1@VCaramesPosted almost 2 years ago@Ryan-Hemrick
Glad I could help! π
0 - Since the images in this component add value and serve a purpose (displaying the product) it needs to be accessible β οΈ. The image needs to be applied using the
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