I'm trying to use Affix, but I have some problem: when I scroll down - my affix div partially disappears under the footer, here is a jsbin example and code. How can I prevent this?
data-offset-bottom="anynumber"
- don't work.
I'm trying to use Affix, but I have some problem: when I scroll down - my affix div partially disappears under the footer, here is a jsbin example and code. How can I prevent this?
data-offset-bottom="anynumber"
- don't work.
This looks more like a z-index
problem. I believe you can fix this by applying higher z-index
value to the .affix
than the footer using CSS.
Example:
set z-index
if not set
yourFooter { position:absolute/relative/fixed /* a positioning is a must */ ; z-index: 300 }
then simply add a higher z-index to the .affix
div. It already has a fixed positioning so there's no need to set the position
for this.
Notes: While calculating z-index, test it with everything first, make sure that the affix does not start appearing above your modals
and others.
Hope this works.