My top navbar is set to Sticky and yet isn’t sticking. On Mobile, I am trying to make it disappear on scroll down but reappears on scroll up, and that isn’t working either. Any ideas please? Thanks!
Hey @Dorian
When using the Sticky positionning, you need to make sure that you add the top value to 0, so that the nav knows it needs to stick to the top.
Did you make sure that the Nav bar section has the highest z-index (it’s not hidden behind the other sections)?
I might be wrong, but I’m not sure you can animate the top property when in sticky, you’d need a workaround.
Hey @jptrinh thanks for the reply. I did not have the top value set to 0, so I added that, but unfortunately its still not sticking. I do have the z-index set to 100 which is the highest on the page apart from a modal. Any other suggestions please? Thanks.
Fixed it! Solution posted in this thread as its related to that: Modal not working properly? - #19 by luka
1 Like