smarret Posted October 28, 2021 Posted October 28, 2021 Site URL: https://www.clic.com/ Hi, I have been having an issue with this site that I can't seem to find an ideal solution to. There are many product pages with different types of products that all have different dimensions of images. Some are artworks that cannot be cropped and are mostly horizontal while some are products that are mostly vertical. Having all images at the same aspect ratio while also having the slideshow gallery option (rather than stacked) causes some of the artworks to be cut off on the checkout page. I tried adding in some css to solve this. This is what I used: .ProductItem-gallery-slides-item-image { object-fit: contain !important; object-position: middle; width: 100% !important; height: 100% !important; position: static !important;} .tweak-product-item-gallery-aspect-ratio-34-three-four-vertical .ProductItem-gallery-slides::before { padding-bottom: 0 !important;} .tweak-product-item-gallery-design-slideshow .ProductItem-gallery-slides-item { position: relative !important;} This did successfully stop images from being cut off on the checkout page, but some of the images show up too large and were blurry. It also created an issue with the slideshow gallery of secondary product images (they showed up with a large gap underneath the main image rather than directly underneath). I removed the code and right now am temporarily using the stacked option, but this isn't ideal and some images are still too big on the checkout page. Here are examples of this issue: https://www.clic.com/art-books/picasso-sculpture https://www.clic.com/love-tanjane/raw-pleat-collar-dress-in-army-from-love-tanjane Is there a way to assign different aspect ratios to different pages of the site without any images cutting off, without images being too big/blurry, and with still being able to use the slideshow option? Thank you!
tuanphan Posted October 31, 2021 Posted October 31, 2021 To apply code on Shop Page only, you can wrap the code in style tag & add to Page Header <style> paste your CSS code here </style> Do similar for other pages 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!)
smarret Posted November 5, 2021 Author Posted November 5, 2021 Thank you! I tried this out, but I'm not sure if the code I had above works for this since it seems to not change anything when I put it in the header under html. I also am still having the issue of images cutting off once I put the slideshow option on the checkout page.
tuanphan Posted November 7, 2021 Posted November 7, 2021 On 11/5/2021 at 10:04 PM, smarret said: Thank you! I tried this out, but I'm not sure if the code I had above works for this since it seems to not change anything when I put it in the header under html. I also am still having the issue of images cutting off once I put the slideshow option on the checkout page. Hi, Which code did you use? 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!)
smarret Posted November 8, 2021 Author Posted November 8, 2021 I used what I had pasted above: ProductItem-gallery-slides-item-image { object-fit: contain !important; object-position: middle; width: 100% !important; height: 100% !important; position: static !important;} .tweak-product-item-gallery-aspect-ratio-34-three-four-vertical .ProductItem-gallery-slides::before { padding-bottom: 0 !important;} .tweak-product-item-gallery-design-slideshow .ProductItem-gallery-slides-item { position: relative !important;} Just tweaking the ratio as needed.
Sibylle_Zurich Posted January 7, 2023 Posted January 7, 2023 On 11/8/2021 at 7:52 PM, smarret said: I used what I had pasted above: ProductItem-gallery-slides-item-image { object-fit: contain !important; object-position: middle; width: 100% !important; height: 100% !important; position: static !important;} .tweak-product-item-gallery-aspect-ratio-34-three-four-vertical .ProductItem-gallery-slides::before { padding-bottom: 0 !important;} .tweak-product-item-gallery-design-slideshow .ProductItem-gallery-slides-item { position: relative !important;} Just tweaking the ratio as needed. Dear @smarret, It seems like you solved the problem. Can you please share the solution/code? I am struggling with the same problem. Many thanks. Sibylle
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment