NOTE: the suggested answer has nothing to do with my question and DOES NOT answer my question. if you are looking for real, quality answer please see:
Unfortunately, most mods/people who vote don't even read the post, they just want to hit "the quota".
Original question:
I know one of the requirements in order for position: sticky
to work is parent shouldn't have overflow
property (hidden/auto). but why if a parent has overflow-x: hidden|auto
it also breaks sticky
? (which scrolls on Y-axis) please see the codepen.io
overflow-x: auto; // won't work
overflow-x: visible; // works
overflow-x: hidden; // won't work
is there a way to make overflow-x: hidden
and position: sticky
work together?
Note: the scroll element need to be window, not an internal dive