Hi Dave,
This is done by using a little CSS and a little JavaScript. You create an
element that uses CSS absolute positioning, and a script to position it.
Then you add another script to handle the window.onscroll event. Here is an
example. It is a complete test HTML document which you can copy into
Notepad, save with a .htm extension, and test it in your browser:
<HTML>
<HEAD>
<TITLE>Title</TITLE>
<script type="text/javascript"><!--
function repos()
{
var el = document.getElementById("div1");
var t = document.body.scrollTop + 10;
document.getElementById("Button1").style.top = t;
}
// --></script>
</HEAD>
<BODY>
<form method="post">
<input style="position:absolute; left: 10px; top: 10px;z-index=2;"
name="Button1" id="Button1" type="button" value="button"></form>
<script type="text/javascript"><!--
window.onscroll = repos;
// --></script>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
<p> stuff</p><p> stuff</p><p> more stuff</p><p> even
more stuff</p>
</body>
</html>
--
HTH,
Kevin Spencer
Microsoft MVP
Bit Player
http://unclechutney.blogspot.com
Expect the unaccepted.