Sorry I can't explain this easily with words, so I got some screen captures to help. I want to do something on my site similar to the AdWords help block that sits towards the top of the page but when you scroll down it stays at the top.
Eg, when looking at the top of the page:
Now, I have scrolled down the page, the help section stays "docked" at the top:
I'm wanting to dock a form like this, in the left column, that is contained in a div with id="leadsbox".
I think your search terms are onscroll and scrollTop.
Thanks but does that CSS position fixed work in this scenario? Initially with no scroll the DIV displays about 100 pixels from the top of the top browser edge.
As you scroll down 0-100 pixels the div gets closer to the top of the browser edge (like a normal div would), when you scroll 100+pixels down, then the div stays docked with the very top of the top browser edge. And the reverse happens when you scroll back up.
Makes more sense? Sorry hard to explain
You seem to have omitted the screen captures.
Yes that makes sense.
I'm viewing this from the office - I guess the captures are blocked by the firewall. :lol:
You can use CSS's position: fixed for this
Note that that doesn't work in IE6, but there are forkarounds for that.
PS. Screen captures are showing for me too
Really? Screen captures are showing for me.