Forum Moderators: not2easy

Message Too Old, No Replies

Fixing a div?

Making a div scroll with page?

         

Seachmall

1:37 pm on Oct 27, 2007 (gmt 0)

10+ Year Member



Is there a way of making a div scroll with the page in CSS, kinda like 'background-position'?
Or will I have to go down the js route?

penders

5:04 pm on Oct 27, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Fixing a div?
Making a div scroll with page?

These are really opposites IMO. The default behaviour for all elements is to 'scroll with the page'. To 'fix a div' you can set

position:fixed
on the element, however, this is not supported by IE6 and there lies the problem.

W3C on position:fixed [w3.org]
...the box is fixed with respect to the viewport and doesn't move when scrolled.