Design comparison
Solution retrospective
CSS + HTML
Set image as background-image with media queries breakpoints.
Community feedback
- @Ziad20022Posted about 1 year ago
Hi how are you talal. Ishowed that you couldn't add the image for this small project
Ican advice you if you allow that you use.source srcset="the link to image for mobile" and write @medai(min-width: ass you decide)
Then add img attreputte and add imgsource for desktob view as normal img src ="***" And deploy both of them in picture attreputte Is that help you
The code will be like that <picture> <source media="(max-width:25em)" srcset="./image-product-mobile.jpg"> <img class="img-card" src="./image-product-desktop.jpg" alt="" /> </picture>
1@stressedballPosted about 1 year ago@Ziad20022
Hey there Ziad!
Thanks for your input. I managed to fix it, I had './images' in the path and fixed it by just having 'images'.
Cheers!
0@Ziad20022Posted about 1 year agoIshowed that you fixed it and i'm happy beacuse i could help you
Cheers@stressedball
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