Jump to content

Infamous problem with aspect ratio of product page images in MOBILE

Recommended Posts

Site URL: https://adrianrydz.squarespace.com/shopartproduct/p/tokyo-sign-dj4tp

Hello to everyone,

I am sorry for asking again. I have my prints in landscape and portrait orientations so I came across serious problems with an aspect-ratio of product images like many other users here (yeah, I read lots of posts about it).

I found out by myself a solution for this problem in DESKTOP so other users could apply to their webs too. You need to choose FORMAT- DESIGN - STACK. It makes all product images stacked in the orientations of your picture. No matter which one it is.

However, this solution not working for MOBILE. I used a code rule wrote by the incredible @tuanphan and @bangank36... and it solves a problem with orientation but leaves a HUGE space above and below landscape pictures. May I ask for any solution for it?

 

PASSWORD... yumichan

 

212681401_256750615888104_1791942600360665476_n.png

Edited by adrianrydz
Link to comment

Add to Design > Custom CSS

/* Black bar top bottom of product images */
@media screen and (max-width:767px) {
.tweak-product-basic-item-gallery-aspect-ratio-23-standard-vertical .ProductItem-gallery-slides:before {
    padding-bottom: 75% !important;
}
}

If this causes problems on other products, remove above code & edit products where you see black space >> Additional Info >> Add a Code Block >> Paste this code

<style>
  /* Black bar top bottom of product images */
@media screen and (max-width:767px) {
.tweak-product-basic-item-gallery-aspect-ratio-23-standard-vertical .ProductItem-gallery-slides:before {
    padding-bottom: 75% !important;
}
}
</style>

 

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
  • 2 weeks later...

Password doesn't work.

Work With Me 🖥️💻📱

Please remember to tag me so that I get a notification and respond to your help requests.

If my answers have helped you, please drop a like and mark my answer as best to help other users find solutions quickly.

You can also thank me or make requests by buying me a coffee . (Caffeine fuels me to take more requests)

For Squarespace Tips & Tricks, visit @squareskills (Youtube 📺 Tutorials)

For Premium and FREE plugins, visit Squareskills (Plugin Store) 🧩

Some links may be affiliate/referral links.

Link to comment
On 8/4/2021 at 6:11 AM, marketingm said:

@Kwamzilla check again 🙂

Use this CSS

@media screen and (max-width:767px) {
.tweak-product-basic-item-gallery-aspect-ratio-32-standard .ProductItem-gallery-slides:before {
	display: none !important;
}}

 

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
On 8/5/2021 at 8:01 AM, tuanphan said:

Use this CSS

@media screen and (max-width:767px) {
.tweak-product-basic-item-gallery-aspect-ratio-32-standard .ProductItem-gallery-slides:before {
	display: none !important;
}}

 

Hi @tuanphan, is there a version of this which will work with just an image block?

I'm trying to change the aspect ratio of the top image on the mobile homepage of suzannehamiltonpodiatry.com.

Desktop works as intended, but on mobile it scales down as landscape, I'd like to make this a portrait format to fill the mobile screen more.

Thanks!

✦✦
Co-founder Hundred Studio 👋

Link to comment
On 8/9/2021 at 6:27 PM, CraigN said:

Hi @tuanphan, is there a version of this which will work with just an image block?

I'm trying to change the aspect ratio of the top image on the mobile homepage of suzannehamiltonpodiatry.com.

Desktop works as intended, but on mobile it scales down as landscape, I'd like to make this a portrait format to fill the mobile screen more.

Thanks!

Add to Design > Custom CSS

@media screen and (max-width:767px) {
div#block-2518090d1655ad77c24f .image-inset {
    padding-bottom: 100% !important;
}
}

 

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.