Hi!
Please can someone assist me.
I’ve seen some other posts regarding this issue but the code hasn’t worked well on my site.
I use the Venture theme and would like to make the product images sticky (see screenshot below).
Thanks in advance!
Hi!
Please can someone assist me.
I’ve seen some other posts regarding this issue but the code hasn’t worked well on my site.
I use the Venture theme and would like to make the product images sticky (see screenshot below).
Thanks in advance!
Try adding this code to the bottom of your stylesheet. It uses position: sticky, so may not work on old browsers, but should not do harm.
.product-single {
display: flex;
flex-wrap: wrap;
}
.product-single .photos {
position: sticky;
top: 70px;
margin-bottom: 25px;
}
.template-product .page-container {
overflow: initial;
}
Hi Tim,
Thanks again for your help!
Your solution is almost perfect but there is a gray bar that has been added which I would like to remove (see screenshot below).
Thanks!
Ok, let’s try to change the code slightly:
@media (min-width: 750px) {
.product-single {
display: flex;
flex-wrap: wrap;
}
.product-single .photos {
position: sticky;
top: 70px;
margin-bottom: 50px;
}
.template-product .page-container {
overflow: initial;
}
.template-product #MainContent {
margin-top: 0;
padding-top: 60px;
}
}
@tim_1 Perfect! Thanks so much! Very happy with this design change.