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

Product component using CSS flex and grid

Dipesh 430

@Dipesh-sapkota1

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 was having problem with switching image form mobile to desktop.

Community feedback

P
Christian 390

@UtopicUnicorn995

Posted

Hi,

I think you can use media queries in css where you change the image url OR you could create 2 <img></img> in HTML and use this:

.mobile--img{ display: none; } @media (max-width: 767px){ .mobile--img{ display:block; }

same with the desktop img.

There's many ways to fix your problem

Marked as helpful

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