product responsive

Please log in to post a comment
Log in with GitHubCommunity feedback
- @hakylepremier
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.
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