Just a quick question about Position ‘Sticky’.
Does anoyone else got a problem with getting ‘Sticky’ to work?
Currently working on a project, and yesterday ‘Sticky’ worked like a charm. But today… well… not working. And no matter what I do, I can get it to work. Not even when I re-build everything with new class names etc.
Would appreciate some feedback on this… and if you know how to fix it, I would be very grateful.
It’s hard to answer without a URL. Anyway, under this link, you find some ideas:
Don’t overflow:hidden
Specifically, look for any overflow property set on the parent. You can’t use : overflow: hidden , overflow: scroll or overflow: auto on the parent of a position: sticky element. – stackoverflow
I support, I also recently used the position: sticky and it worked once. Вid not save the page with the problem and rebuild everything with the help of position: fixed + interactions.
I know I havent used any overflow: Hidden…I haven’t used it on anything on my project… but, believe it or not, I did find a overflow:hidden on a page wrapper… The main div block, so to say… and the one I’m using ‘sticky’ on, is about 6 levels down from there… lots of parents in between.
How this happened, I don’t know… but I’ve found and solve the problem now.
So thank you so much guys, for all your help!
Cheers,
Sven
Yeah! Thanks a lot! Mine was working perfectly and then stopped working out of nowhere… and then I found an overflow: auto on a different element. Turned it off and now sticky works again