|
|
always on top menu
Keeping a menu on top of the surrounding content is sometimes a good thing. Use this if you have a page that is long and your users need an easy and quick way to make selections from a menu according to whatever you provide. The menu will stay on top of the surrounding content. <html> <head> <script type="text/javascript"> var timer; function scrolltop() { document.getElementById('scrollmenu').style.top=document.body.scrollTop; timer=setTimeout("scrolltop()",1); } function stoptimer() { clearTimeout(timer); } </script> </head> <body onload="scrolltop()" onunload="stoptimer()"> <span id="scrollmenu" style="position:absolute"> <b>Menu</b><br /> <a href="page.html ">List Item</a><br> <a href="page.html">List Item</a><br> <a href="page.html">List Item</a><br> </span> <table border="0" width="100%"> <tr> <td width="100"></td> </tr><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr>><tr> <td>Menu On Top</td> </tr> </table> </body> </html> The menu will glide as the page is moved along the length of the page. You can place this as an absolute or relatively positioned page element as given within the opening and closing SPAN tags at the top of the page.
|
|