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

Parfume_BeytullahArikan

arikanbโ€ข 20

@arikanb

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


###I found difficult to change the image for responsive design. How can I change the image without JavaScript, with only css?

Community feedback

Lartzmanuelโ€ข 190

@Lartzmanuel

Posted

You can use media queries like this:

@media-query only screen and (min-width: 700px){
.image-container {
    content: url(/assets/images/etc);
    Object-fit: cover;
  }
}

Note that I just used 700px as my break point for example sake. You can adjust the break point to your liking.

I hope this helps๐Ÿ‘

0
Cesar Valenciaโ€ข 260

@cvalencia1991

Posted

use media queries

0
Daniel ๐Ÿ›ธโ€ข 44,230

@danielmrz-dev

Posted

Hello @arikanb

You can do it using flexbox and media queries. It's not that hard to do it.

Hope it 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