Search code examples
cssjquery-scrollify

scrollify doesn't work inside a position:fixed div


I'm trying to use scrollify in a div whith fixed position, but it doesn't want to

i have to disable the parent fixed position and all overflows... Anyone has an idea?


Solution

  • Unfortunately, scrollify does not work inside a div with a fixed position. This is because of the way fixed positioning works in CSS. When an element has a fixed position, it is taken out of the regular document flow and is not affected by other elements. Therefore, scrollify cannot detect the scroll events inside the fixed position div.

    The best solution would be to avoid using a fixed position div and instead use a different type of positioning such as absolute or relative. Alternatively, you could use a different JavaScript library or plugin that is designed to work with fixed position elements.