Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Product preview card component

SD_Voyez 110

@SD-Voyez

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Solution retrospective


I personnaly used this HTML command to call the images in the both resolution :

<picture> <source media="(max-width: 620px)" srcset="images/image-product-mobile.jpg"> <img src="images/image-product-desktop.jpg" alt="Photo de parfum"> </picture>

Works so fine :)

Community feedback

@VCarames

Posted

Hey there! 👋 Here are some suggestions to help improve your code:

  • It is best practice to use, Classes for your naming convention as classes are reusable, making them ideal for CSS styling. IDs on the other hand, are not reusable and are mainly used for JavaScript.

  • To center you content to your page, add the following to your Body Element:

body {
    min-height: 100vh;
    display: grid;
    place-content: center;
}
  • The Alt Tag Description for the image needs to be improved upon. You want to describe what the image is; they need to be readable. Assume you’re describing the image to someone.

  • The only heading in this challenge is the name of the perfume, “Gabrielle Essence Eau De Parfum” . The rest of the text should be wrapped in a Paragraph Element.

  • The old price 🏷 is not being announced properly to screen readers. You want to wrap it in a Del Element and include span element with an 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 helpful

1

SD_Voyez 110

@SD-Voyez

Posted

@vcarames

Thanks for your help !

I have made the corrections you have brought to me and learned things. thank you.

https://sd-voyez.github.io/frontend_mentor_challenge_2/

0
Adeola Ganiu 1,320

@Deolabest

Posted

Hey @SD-Voyez, Congratulations on completing this challenge!

Here is my feedback:

  • Use <main> instead of a simple <div> to improve the semantics and accessibility on the page. Remember that every page should have a <main> block and that <div> doesn't have any semantic meaning.

  • The original price needs a little margin at the bottom to match the project's requirement.

Keep doing a good job!

Marked as helpful

1

SD_Voyez 110

@SD-Voyez

Posted

@Deolabest

Thanks for your help !

I have made the corrections you have brought to me and learned things. thank you.

https://sd-voyez.github.io/frontend_mentor_challenge_2/

0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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