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

Responsive Product Card (HTML & CSS)

@jonaschacon

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


What are you most proud of, and what would you do differently next time?

I managed to make it responsive.

Community feedback

@weldu0

Posted

👋 Hey, Jonas! I have a few suggestions for your project:

Use <picture> for Multiple Images

<picture class="image">
  <source srcset="images/desktop.jpg" media="(min-width: 768px)">
  <img src="images/mobile.jpg" alt="Product image">
</picture>

You no longer need to use display: none; the browser will take care of which image to display.

Use <footer> Instead of <header> for .attribution

Use <section> for Grouping Related Content For example, the .information div could be wrapped in a <section> element.

<section class="information">
...
</section>

Use Classes (.class) Instead of IDs (#id) for Styling Use IDs when working with JavaScript or accessibility.

More info:

I hope this helps you! 😊

Marked as helpful

0

@jonaschacon

Posted

Thanks for the suggestions, they will help me a lot! 😊 @weldu0

1

@weldu0

Posted

You're very welcome! I'm glad to hear that!😊 @jonaschacon

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