I have fixed parent div, that contains elements with absolute position, that overflow parent size, and a fixed element with high z-index, that hovers as parent as far as another child’s.
Code:
<div style="position:fixed;width:70%;height:70%;overflow-y:scroll;z-index:100;background:lightgrey;overflow-x:hidden">
<div style="position:absolute;width:50%;height:10%;z-index:1;background:darkgrey;top:10%"></div>
<div style="position:absolute;width:50%;height:10%;z-index:1;top:30%;background:darkgrey"></div>
<div style="position:absolute;width:50%;height:10%;z-index:1;top:50%;background:darkgrey"></div>
<div style="position:absolute;width:50%;height:10%;z-index:1;top:70%;background:darkgrey"></div>
<div style="position:absolute;width:50%;height:10%;z-index:1;background:darkgrey;top:90%"></div>
<div style="position:absolute;width:50%;height:10%;z-index:1;background:darkgrey;top:110%;"></div>
<div style="position:fixed;width:100%;height:20%;z-index:1000;background:red"></div>
There are a lot of questions about how to prevent scrolling the parent when scrolling the fixed child, but what do I need is vice-versa. I need to make parent scroll, even if the mouse, or the touch is dealing with fixed child.
In iOS it actually works, but in Android, when I trying to scroll touching the fixed div - nothing happens.
What do I need to do to make parent scrolling, when the fixed child is scrolled(fixed child overflow
is auto
) on Android?
Also, the code above
On iOS and on Android
I need when I touching(scrolling) red rect make the parent(grey) div scrolling.