Here you can see an example: http://alboard.free.fr/adrien/test.html
The layout is based on horizontal scrolling (red element). But I want the top to be fixed (blue element).
If the user resizes the viewport, a vertical scroll bar will appear. If at this moment the user scrolls down, the red element will grow while the blue element remains fixed. This violates the layout (the red element overlaps with the blue element).
Is it possible to make a blue element fixed horizontally, but scrollable vertically?
I know there are javascript solutions based on onscroll. But there is always a latency between the moment the user scrolls and the moment when the position of the element adapts to the new offset.
source
share