-1

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?

Buta Gaz
  • 1
  • 1
  • Please include a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) so we can see the issue. Debugging code without being able to see it is practically impossible. – DBS Jan 20 '23 at 17:04
  • Yes i know, sorry but my code is too heavy and contain explicit content... – Buta Gaz Jan 21 '23 at 18:36

2 Answers2

0
.fixed-content {
    top: 0;
    bottom:0;
    position:fixed;
    overflow-y:scroll;
    overflow-x:hidden;
}

try this and please post your code with the question or erorr this will make more sence if people try to help you with your code

Deepak Das
  • 177
  • 1
  • 6
  • Yes i know, sorry but my code is too heavy and contain explicit content... I'll try your solution but i've allready tried to separate axis of overflows, sadly for me – Buta Gaz Jan 21 '23 at 18:29
0

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.

Talha
  • 45
  • 8
  • 1
    Yes, i'm looking for other way, i think i'll do this only with CSS, unfortunately i'll loose the before and After évents. Many thanks, you make me win Time stoping to try for nothing, thx – Buta Gaz Jan 21 '23 at 18:35