RNB
asked on
Having a Div overlap other divs, but still scroll with the page.
I am trying to get a div tag that I have overlapping other divs with the "z-index" and 'position' rules. Everything looks good except the div stays put even when the page scrolls. Is there a way to get this fixed position div to scroll with the rest of the page?
ASKER
@Rainverse:
I want the fixed div to scroll. On the link you sent the navigation box stays where it is and the page scrolls behind it. I want the fixed div to scroll with the page.
I want the fixed div to scroll. On the link you sent the navigation box stays where it is and the page scrolls behind it. I want the fixed div to scroll with the page.
You want the content in the div to scroll while the main window is scrolling. Am I understanding you now?
-MJC
-MJC
ASKER
@ Rainverse:
Yea I am only using this method for its overlapping capabilities. I do want it to scroll with the rest of the page though.
Yea I am only using this method for its overlapping capabilities. I do want it to scroll with the rest of the page though.
Try this javascript:
-MJC
window.onscroll = function () {
document.getElementById("divID").scrollTop = document.body.scrollTop;
}
-MJC
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
http://www.cssplay.co.uk/layouts/fixed.html