Jump to content

Custom Aspect ratio on product page in mobile

Recommended Posts

Hi guys!
I use this code to make my paintings fit into a square, it works fine, but it doesn't work in the mobile version on the product page in the carousel.
And also it doesn't work in the shopping cart and in the mobile version too 😞
How to fix it?



.grid-image img {
    object-fit: contain !important;
}

 

https://falcon-lavender-b2h4.squarespace.com/
pw: support

 

 

 

Edited by Venera
Link to comment

Don't remove any code in your current code

Add to Design > Custom CSS

img.ProductItem-gallery-slides-item-image {
    object-fit: contain !important;
}
.cart-row-img-wrapper div {
    background-size: contain !important;
}

 

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!)

Link to comment
18 hours ago, tuanphan said:

Don't remove any code in your current code

Add to Design > Custom CSS

img.ProductItem-gallery-slides-item-image {
    object-fit: contain !important;
}
.cart-row-img-wrapper div {
    background-size: contain !important;
}

 

Big thanks! ☺️

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.