rocketbase Posted November 10, 2023 Posted November 10, 2023 (edited) I'm trying to make the product carousel crop from the center once the page is below 1360px wide. I have it pretty much working, but can only get it so the images are cropped from the right edge inward. Code is presently set as: /*Product Gallery Responsive Fit Adjustment*/ @media screen and (min-width:1360px) {.ProductItem-gallery-slides img { height: auto !important; width: 50vw !important; overflow-x: hidden !important; } .ProductItem-gallery div { height: auto !important; }} @media screen and (max-width:1359px) and (min-width:767px) { .ProductItem-gallery-slides img { min-height: 480px !important; width: auto !important; overflow-y: hidden !important; } .ProductItem-gallery div { min-height: 480px !important; width: 50vw !important; } .ProductItem-summary { min-height: 480px !important; } .product-item-gallery-carousel-control { margin-top: 225px !important; }} Thanks in advance for any help offered. Edited November 10, 2023 by rocketbase
SaranyaDesigns Posted November 10, 2023 Posted November 10, 2023 @rocketbase can you share a link to the page you need help with so we can see the code in action?
rocketbase Posted November 13, 2023 Author Posted November 13, 2023 @SaranyaDesigns Sorry, yes. URL is https://www.westgateone.co.uk/rent-studios/p/premium-studio-a
Solution SaranyaDesigns Posted November 13, 2023 Solution Posted November 13, 2023 @rocketbase ok start by removing all of your current code for (max-width:1359px) and (min-width:767px). And try replacing with this: @media screen and (max-width:1359px) and (min-width:767px) { .ProductItem .ProductItem-summary { align-items: stretch !important; } .ProductItem-gallery { float: none !important; } .ProductItem-gallery-slides { height: 100%; } .ProductItem-gallery-slides img { object-fit: cover !important; } } Let me know? rocketbase 1
rocketbase Posted November 14, 2023 Author Posted November 14, 2023 Thanks @SaranyaDesigns. That works great. Much appreciated. SaranyaDesigns 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment