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 preview card component

#sass/scss#tailwind-css#styled-components
Joseph Odunsiā€¢ 140

@dhatGuy

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

@VCarames

Posted

Congrats @dhatGuy for completing this challenge!

When dealing more than one image that need to show up depending on the screen size (desktop/table/mobile), you want to use the <picture> element. So your code for the images should look like this:

<picture>
  <source media="(min-width: )" srcset="desktop image goes here">
  <img src="mobile image goes here" alt="">
</picture>

Marked as helpful

0

Joseph Odunsiā€¢ 140

@dhatGuy

Posted

@vcarames, thanks for the feedback. I tried it but couldn't understand how it works. I'll look into it again.

0
Joseph Odunsiā€¢ 140

@dhatGuy

Posted

@vcarames, thank you. I have successfully implemented it.

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