I have been experimenting on making the product info wrapper in my Shopify store sticky while scrolling, but I can’t seem to get it work. Below, I have added an image of the site that does what I am looking for.
I am using DAWN 2.0 as my theme.
The link to this website can be found here.
Thank you in advance!
Please share your store link?
Go to your Online store > Themes > Edit code > Assets > section-main-product.css, and add this code at the bottom of the
@media screen and (min-width: 750px) {
.product__column-sticky {
display: block;
position: sticky;
top: 3rem;
z-index: 2;
}
}
file
I did it, but it didn’t work.
Sorry, please update code to this
@media screen and (min-width: 750px) {
..product__info-container {
display: block;
position: sticky;
top: 3rem;
z-index: 2;
}
}
I assume the double “.” was a mistake! However, I did try it with double and single point but still no success.
I found the problem! In my section-main-product.css was a css called .product__column-sticky, I removed this one and added this code :
.product__info-container {
display: block;
position: sticky;
top: 3rem;
z-index: 2;
}
And now it works exactly as expected! @Dan-From-Ryviu Thank you for your time and effort on this one.
You are very welcome
