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 responsive

@warrenbarney

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

@hakylepremier

Posted

Okay so I think you found it difficult to do the responsive design because you used the same image for both desktop and mobile. There where two separate images so to achieve a responsive design you had to use a picture tag instead of the image tag you used.

For example this:

<img src="images/image-product-desktop.jpg" alt="">

would replaced by this:

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

You can find more information at this link.

Hope this helps.

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