Jump to content

Product Images in Product view not showing correctly

Recommended Posts

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

Screenshot 2020-02-13 at 12.07.04.png

Screenshot 2020-02-13 at 12.07.19.png

Link to comment
  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

Link to comment
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 🙂

 

Link to comment
  • 6 months later...
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

How to: Setup Password & Share url Insert Custom CSS - Page Header - Upload Custom Font - Upload File - Find Block ID - Contact Customer Care

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.