How to make a product page image sticky when scrolling?

How to make a product page image sticky when scrolling?

SantosBaez
Excursionist
22 0 9

Hello,

 

I'm trying to make the image on my product page sticky so that the image stays visible when you scroll. Currently, the left column is sticky, so when I try to do 'position: sticky' for the image, the image drops, even if I delete 'position: sticky' for the left column.

 

Screenshot 2023-12-11 164610.png

 

Any help with this is greatly appreciated.

 

https://coffeeinboxes.com/products/coffee-box-of-6

Replies 4 (4)

ShopDoc
Shopify Partner
99 7 9

What theme are you using?

- Shaun
YouTube
TikTok
SantosBaez
Excursionist
22 0 9

Hello! I'm using Origin.

BSS-Commerce
Shopify Partner
3477 464 554

Hi @SantosBaez ,

You can try use css property: position: fixed and use responsive and js to control the sticky image. I try use this code and it works but it have to be customed more.

    position: fixed;
    top: 150px;
    max-width: 605px;
    max-height: 605px;

 

If our suggestions are useful, please let us know by giving it a like, marking it as a solution, or donating here .


B2B Solution & Custom Pricing | Product Labels by BSS


Need help from our expert? Kindly share your request with us via community@bsscommerce.com


BSS Commerce - Full-service eCommerce Agency
SantosBaez
Excursionist
22 0 9

Thank you for looking into this. This works, but now the image is sticky all the way through to the bottom, overlapping other elements.