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 - using html and CSS.

Mauritzโ€ข 290

@MauritzLM

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 @MauritzLM ๐Ÿ‘‹, good job completing this challenge, and welcome to the Frontend Mentor Community! ๐ŸŽ‰

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

  • Use the <main> tag to wrap all the main content in your solution instead of using <div class="card-container">.
  • Use <footer> instead of <div class="attribution">. The <footer> element contains authorship information.
  • The image's proportions don't look good on my computer. To create two columns with flexbox, you can add the property flex: 50%; to picture and .product-info. More information.
.product-info, picture {
     flex: 50%;
}
  • You could use the <del> tag to display the old price:
<del class="normal-price">
   <span class="sr-only">Old price: </span>$169.99
</del>

Note that I added the <span> with the sr-only class to the del element, this will provide more information about what your old price is about.

The sr-only class is a class that you can add to hide content visually but is only visible to screen-readers.

More information here.

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

Good job, and happy coding! ๐Ÿ˜

Marked as helpful

2

Mauritzโ€ข 290

@MauritzLM

Posted

Hi @MelvinAguilar, thank you very much for your feedback. I'll be looking into making these improvements.

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