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 page

@DipakMahara

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?

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

matt2282 310

@matt2282

Posted

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 helpful

0

@DipakMahara

Posted

@matt2282 Thank you for your guidance. I will try this

0
naufaluqh 90

@naufaluqh

Posted

nice workkk

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