100% Visible Div
Moderator: General Moderators
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
100% Visible Div
Hey guys, I have a div that becomes visible upon clicking a link. The page uses vertical scrolling. What I want is a way for the div to pop up approximately 50px from the top of the browser frame, so no matter how far scrolled down you are, it still is completely visible. Does anyone know how this could be achieved?
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
Code: Select all
d.style.top = window.pageYOffset + 10 + 'px';
d.style.left = window.pageXOffset + 10 + 'px';- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia
- Kieran Huggins
- DevNet Master
- Posts: 3635
- Joined: Wed Dec 06, 2006 4:14 pm
- Location: Toronto, Canada
- Contact:
- iknownothing
- Forum Contributor
- Posts: 337
- Joined: Sun Dec 17, 2006 11:53 pm
- Location: Sunshine Coast, Australia