Sticky header + scrollable menu (scroll.X/Y)

Hi,

I have a sticky header and I want to add a menu that always slides down below this header. I tried to use a variable like this
LVAR.scrollX/Y
LVAR=widget_name

to find out the position of the sticky header …but it doesn’t work.

I also tried to use “pin to browser” for both things, but I lose the functionality to scroll the menu.

problem.rp (93.8 KB)

I don’t get it - help is appreciated. I really need this and I can’t make it work :sweat:

Hi!

Try this:

Move menu to 0, [[Window.scrollY + LVAR1.height]]

…assuming LVAR1 is a local variable representing the sticky header.

(Window.scrollY gives you the pixel that the page is scrolled to, so Window.scrollY plus the height of the sticky header is where you want to place the menu.)

2 Likes

Yeah thx, that works!