TPatts Posted February 13, 2020 Posted February 13, 2020 Site URL: https://www.handmadecrafthouse.co.uk/shop/river-frost-print Hi, I hope someone can help me! I sell photography prints and it is important for my customers to be able to see the whole of the image that they will be buying. However, if they try to view my products on their mobile device then they will only see a thin slice of the actual image. I've attached images of how it should look (the wide image) and how it actually looks on mobile (the thinner one). I'm trying to fix this with CSS and the media-screen query - I've tried content-fit rule but that doesn't seem to be working on it, although I'm not not entirely sure I'm even targeting the right thing. This is my code - @media only screen and (max-width: 768x) { .ProductItem-gallery { object-fit: contain } } Many thanks in advance Tim
tuanphan Posted February 13, 2020 Posted February 13, 2020 Add to Home > Design > Custom CSS @media screen and (max-width:640px) { .ProductItem-gallery-slides-item img { width: 100% !important; height: auto !important; left: 0 !important; } figure.ProductItem-gallery { height: 250px; } } Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
TPatts Posted February 13, 2020 Author Posted February 13, 2020 23 minutes ago, tuanphan said: Add to Home > Design > Custom CSS @media screen and (max-width:640px) { .ProductItem-gallery-slides-item img { width: 100% !important; height: auto !important; left: 0 !important; } figure.ProductItem-gallery { height: 250px; } } Marvellous! That's fixed it up a treat! Many thanks 🙂
Aerdon Posted August 30, 2020 Posted August 30, 2020 I was looking for the same solution and came across this answer. I tried it, but it made my picture disappear. Looking at your site on mobile, @TPatts, your images are blank, too. I'm using Safari for iPhone. Is there maybe an update to this CSS, @tuanphan? Thanks!
tuanphan Posted August 30, 2020 Posted August 30, 2020 6 hours ago, Aerdon said: I was looking for the same solution and came across this answer. I tried it, but it made my picture disappear. Looking at your site on mobile, @TPatts, your images are blank, too. I'm using Safari for iPhone. Is there maybe an update to this CSS, @tuanphan? Thanks! Can you share link to product? Email me if you have need any help (free, of course.). Answer within 24 hours. Or send to forum message Contact Customer Care - Learn CSS - Buy me a coffee (thank you!)
Aerdon Posted September 4, 2020 Posted September 4, 2020 Sure. Any of the products on his page on mobile. For example, https://www.handmadecrafthouse.co.uk/shop/p/river-frost-print. I am using an iPhone 11 Pro Max. I tried on an iPhone 11 and the image is present.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.