Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Moving Divisions along with the scrollbar... 1

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
How do you move Divisions when you scroll up/downa page so that they are always at the top of the page?
Thanks
Matt
 
function fut()
{
div_id = "thing";
div_id = eval(div_id);
div_id.style.display="none";
div_id.style.posTop = document.body.scrollTop + 5;
div_id.style.posLeft = document.body.offsetWidth - 170;
setTimeout("div_id.style.display='inline';", 500);
}

window.onscroll=fut;
</script>
<div id=&quot;thing&quot; style=&quot;position:absolute;background-color:#dbdbdb;width:150;&quot;></div>

works in ie.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top