Can you provide me css code which makes elements sticky? In my posts I have images – they should be sticky. I tried
.sticky-img {
position: -webkit-sticky;
position: sticky;
top: 0;
}
but it doesn’t work probably due to
#td-outer-wrap {
overflow: hidden;
}
Thanks!
Hi,
Using our them you can set sticky only the columns/sidebars and these can be set using the guide from here -> https://tagdiv.com/multiple-sticky-sidebars/ -> https://forum.tagdiv.com/smart-sidebar-2/
Hope this will help you!
No it won’t help me.
I have plugin which inserts into post content div which looks like this -> https://prnt.sc/tpq06q
Code looks like this:
<div class="content">
<div class="sticky-img"></div>
<div class="text">Lorem ipsum text</div>
</div>
And css:
.content {
width: 100%;
}
.sticky-img {
width: 50%;
height: 100vh;
background-size: cover;
float: left;
}
.text {
width: 50%;
float: left;
}
Due to height of .text div I want to make div .sticky-img just sticky. As i said I tried
.sticky-img {
position: -webkit-sticky;
position: sticky;
top: 0;
}
but I doesn’t work probably because of
#td-outer-wrap {
overflow: hidden;
}
Please help me with this 🙂
Hello !
Unfortunately achieving this will require custom work which is not covered by the support team as you can see here: https://forum.tagdiv.com/newspaper-theme-support/
You can contact our custom work team here: https://tagdiv.com/web-development-services/
Thank you !
Hello @r1kay,
Our theme has the option to make sticky elements only columns and sidebar => https://tagdiv.com/multiple-sticky-sidebars/
If you want to have other elements to be sticky, you need to add an extra class on that element => https://www.screencast.com/t/X7xYjYvUov, and you can write a custom code CSS on that extra class to make it sticky.
Thank you!