I'm currently trying to find a way to lock my header on the screen after most of it has scrolled off the top.
So, if for example, my header was 150 pixels high, is there anyway I could lock the bottom 15 pixels at the top of the screen after the top 135 pixels have scrolled off the top as the user scrolls down my page? So that no matter how long my page becomes, there will always be the bottom 15 pixels of my header at the top of it.
I also need to reverse this when the user scrolls back up, so that the header can return to it's original state.
I've tried a dirty work around whereby having another header 15 pixels high with a "fixed" position layered behind my original header, so that when the full 150 pixel original one goes off the screen my new one appears out from behind it. This does work, but if the user catches it at mid point it looks disgraceful.
I have extremely limited knowledge of JavaScript and fear that may be where my answer lies.