I am using the Refresh theme and I added a banner with “Zoom In on scroll” image behavior. The problem is on Desktop it looks great but on mobile the image is zoomed in without even scrolling.
When I set the image behavior to none it works fine on both mobile and desktop.
I really would like to use “Zoom in scroll” image behavior and I tried some of the CSS code recommended on the internet but nothing worked.
Thank you Lynth for your quick response.
I tried what you suggested but it applied to all my banners. The banner that I want to modify became zoomed out which is good but there are now blank spaces above and under it.
If I turn it off but setting the image behavior to none, It works fine.
you have to specify the class so as not to affect all. Add maybe #Banner-template–15474553880710__image_banner_gmRjWx (it’s a unique ID, but I’m not sure it is dynamic).
Great, now it is only affecting the banner that I want.
But what about the blank spaces above and under the banner that I want to adjust? Is there a way so that the mobile banner cover the whole space? should I change the aspect ratio?
Go to the Online Store - Theme - three dots - and search the .css extension file, it could be custom.css / base.css or something like this.
Then paste this inside, on the bottom:
The image now is zoomed out in the Banner which is great but still shows blank space above and below the image.
I think the problem is with this function itself inside Shopify. Based on what I found online other people had the same problem and couldn’t fix it.
I will change the image behavior to none and keep it that way since it fits perfectly.