Zoom in on hover without changing the image container size

Solved

Zoom in on hover without changing the image container size

HannaSak
Tourist
12 1 3

Hello Shopify Community, 

 

If you click on the link to my site: https://bambooliving.com/collections/all-home-models you will notice that I have a zoom on hover effect implemented for the images. I want the zoom to work without the image container size changing, so I used the { overflow: hidden; } CSS property which only partially worked. For whatever reason, the image container is expanding, but ONLY at the bottom of the image.  Does anyone have a fix for this? 

 

Thank you in advance for your help!

Accepted Solution (1)

PageFly-Richard
Shopify Partner
4668 1069 1726

This is an accepted solution.

Hi @HannaSak 

 

This is Richard from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

<style>
.product-card__figure {
overflow: hidden;
}
</style>

The overflow hidden should be added to the container itself, not the image

Hope this can help you solve the issue 

 

Best regards,

Richard | PageFly 

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

View solution in original post

Replies 2 (2)

PageFly-Richard
Shopify Partner
4668 1069 1726

This is an accepted solution.

Hi @HannaSak 

 

This is Richard from PageFly - Shopify Page Builder App

 

Please add this code to your theme.liquid above the </head> to get this solved

Step 1: Online Stores > Themes > More Actions > Edit code

Step 2: click on theme.liquid and paste the code above the </head>

<style>
.product-card__figure {
overflow: hidden;
}
</style>

The overflow hidden should be added to the container itself, not the image

Hope this can help you solve the issue 

 

Best regards,

Richard | PageFly 

Please let me know if it works by giving it a Like or marking it as a solution!


➜ Optimize your Shopify store with PageFly Page Builder (Free plan available) 


All features are available from Free plan. Live Chat Support is available 24/7.

HannaSak
Tourist
12 1 3

Hi Richard, this did the trick! Thank you so much for your help!