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

Mikhaelβ€’ 120

@mikhael7

Desktop design screenshot for the Product preview card component coding challenge

This is a solution for...

  • HTML
  • CSS
1newbie
View challenge

Design comparison


SolutionDesign

Community feedback

@MelvinAguilar

Posted

Hi @mikhael7 πŸ‘‹, good job completing this challenge! πŸŽ‰

I have some suggestions you might consider to improve your code:

  • Instead of using <section> to wrap all the main content, use <main> tag to improve the accessibility of the website.
  • Setting a defined height for the card component is not recommended. The content should define the component height, otherwise, it will not be allowed to extend beyond your specifications. Alternatively, you can use min-height.
  • Setting element width with percentages or VW will cause your component to behave weirdly on mobile devices and high-resolution desktops. You can set the max-width at 32.5rem.
  • I recommend adjusting the breakpoint. On devices between 800px and 475px wide your image is completely distorted
  • Not all images should have alt text. The cart icon is for decoration purposes only, so it can be hidden from screen-readers by adding aria-hidden="true" and leaving its alt attribute empty:
<img src="./images/icon-cart.svg" alt aria-hidden="true" width="fit-content" class="icon-cart">

Above all, the project is done wellπŸ‘. I hope those tips will help you! πŸ‘

Good job, and happy coding! 😁

Marked as helpful

2

Mikhaelβ€’ 120

@mikhael7

Posted

@MelvinAguilar Hi πŸ‘‹, thank you for your feedback and suggestion, i will fix and remember it 😁

1

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