I've been grappling with this issue for quite some time. I'm in need of a div that remains fixed in position when its parent is scrolled horizontally, yet moves along with the content when scrolled vertically. The key is to ensure that the scrolling appears seamless.
You can view an example of the problem on this jsfiddle. The issue arises when the fixed div doesn't disappear from view upon reaching the top border of its parent container.
Although I previously posted a similar inquiry on Stack Overflow, I didn't receive any helpful responses. The jsfiddle linked there provides a clearer illustration of my objective.
I've come across several queries resembling mine, but most are resolved using "sticky" techniques. Many solutions referenced in this article focus on sticky elements, which isn't exactly what I'm looking for.
Your assistance would be greatly appreciated as I'm currently at a standstill :-)
ps: I've encountered examples where the fixed div scrolls beyond the browser window, but not outside a parent container.
EDIT: While I have found solutions for scenarios involving individual scrollbar movements, they fail when dragging diagonally.