Jump to content

Change the Store Product Listing Page image aspect ratio inline element.style to be "contain" not "cover" - so images are displayed in their native aspect ratio

Recommended Posts

Posted (edited)

Hi,

I've looked for the answer in lots of places and not found an answer or a definite "it can't be done". So hopefully someone can help.

My client's store product listing page has the images in a fixed aspect ratio.  They are selling artworks and so they need to be displayed in their original ratio or the artists are understandably aggrieved.
There is an inline style "element.style { object-fit: 'cover';} "  which I want to change to object-fit: 'contain'

Is it possible to override the inline style for all images displayed on the Listings Page?

element.style {
  1. width: 100%;
  2.  
    height: 100%;
  3. object-position: 50% 50%;
  4. object-fit: contain;
}

 

Thank you

Edited by og1char
add DevTools style
  • Replies 4
  • Views 2k
  • Created
  • Last Reply

Top Posters In This Topic

  • 2 weeks later...
  • 1 month later...

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.