Locking a DIV so that it ignores scroll ?

S

Stevo

I need to lock a DIV in place so that regardless of the scroll position,
it remains stuck in a corner. Currently I'm hooked into the scroll
events and I'm positioning dynamically based on the scroll amount. So if
you scroll down 1000 pixels, then I'm adding 1000 pixels to the position
I normally would calculate to fit it in the corner. This works cross
browser already, but the responsiveness to the scroll events isn't
immediate enough. You can see a bit of a stuttering effect.

Does anyone know of a property that will lock a DIV to a certain
position in the browser rather than a certain position in the page (yes
I know it's CSS but there isn't a CSS forum on my news server and this
is where the clever people are)? I'm pretty sure I heard that such a
property exists but it's not something that's easy to google. The terms
involved find way too many results that aren't relevant. I haven't even
managed to find (via google) somebody that's doing what I'm already doing.

I don't mind if it's using some IE and/or Gecko proprietary properties.
 
D

Darko

I need to lock a DIV in place so that regardless of the scroll position,
it remains stuck in a corner. Currently I'm hooked into the scroll
events and I'm positioning dynamically based on the scroll amount. So if
you scroll down 1000 pixels, then I'm adding 1000 pixels to the position
I normally would calculate to fit it in the corner. This works cross
browser already, but the responsiveness to the scroll events isn't
immediate enough. You can see a bit of a stuttering effect.

Does anyone know of a property that will lock a DIV to a certain
position in the browser rather than a certain position in the page (yes
I know it's CSS but there isn't a CSS forum on my news server and this
is where the clever people are)? I'm pretty sure I heard that such a
property exists but it's not something that's easy to google. The terms
involved find way too many results that aren't relevant. I haven't even
managed to find (via google) somebody that's doing what I'm already doing.

I don't mind if it's using some IE and/or Gecko proprietary properties.

style="position: fixed"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,148
Messages
2,570,838
Members
47,385
Latest member
Joneswilliam01

Latest Threads

Top