Design comparison
Solution retrospective
try simple things and dont jump directly to div tags.
What challenges did you encounter, and how did you overcome them?my friend give some pointer to work on
What specific areas of your project would you like help with?i thick my basic about html
Community feedback
- @matt2282Posted 4 months ago
It is common practice to name your css file "style.css"
When you load a mobile page and then go back to the desktop page it was keeping the mobile image loaded instead of changing it back to desktop again. You can replicate this by zooming in all the way and zooming out. The only way I was able to fix this was using this method: <picture class="product-image"> <source srcset="images/image-product-desktop.jpg 600w" media="(min-width: 600px)" /> <source srcset="images/image-product-mobile.jpg 686w" media="(max-width: 599px)" /> <img src="images/image-product-mobile.jpg" alt="Product Image" /> </picture>
You could also use media query to do this but that is less efficient as it loads both images regardless of which device you are on.
Marked as helpful0@DipakMaharaPosted 4 months ago@matt2282 Thank you for your guidance. I will try this
0
Please log in to post a comment
Log in with GitHubJoin 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