Submitted over 2 years ago
responsive preview page using fle and float
@nottundeednut
Design comparison
SolutionDesign
Solution retrospective
having issues with mobile design
Community feedback
- Account deleted
Hi! There are 2 kinds of pictures inside the images folder (image-product-desktop.jpg and image-product-mobile.jpg).
So one solution is that you can add both to the HTML page, and you can hide them in CSS.
for example: HTML:
<img src="images/image-product-desktop.jpg" class="img-desktop" />
/<img src="images/image-product-mobile.jpg" class="img-mobile" />
CSS:
@media (max-width: 450px) { .img-desktop { display: none; }}
/@media (min-width: 450px) { .img-mobile { display: none; }}
Marked as helpful1
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