Michael Wittman Panzer Ace.
Posted: Sun Dec 19, 2004 3:14 am
Hi, to know how, open the "page source" with your browser and serach for:Arro wrote:Nice! I like the site design too. I need to figure out how to do the floating menu thing.
Code: Select all
<html>
<head>
<title>Floating Div (Top Left)</title>
</head>
<body bgcolor="#000000">
<!-- ********************************************************* -->
* You may use this code for free on any web page provided that
* these comment lines and the following credit remain in the code.
* TopLeft Floating Div from http://www.javascript-fx.com
******************************************************** -->
<div id="divStayTopLeft" style="position:absolute">
<img src="javascriptfx.gif"/>
</div>
<script type="text/javascript">
function JSFX_FloatTopLeft()
{
var startX = 10, startY = 100;
var ns = (navigator.appName.indexOf("Netscape") != -1);
var d = document;
var px = document.layers ? "" : "px";
function ml(id)
{
var el=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
if(d.layers)el.style=el;
el.sP=function(x,y){this.style.left=x+px;this.style.top=y+px;};
el.x = startX; el.y = startY;
return el;
}
window.stayTopLeft=function()
{
var pY = ns ? pageYOffset : document.documentElement && document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop;
ftlObj.y += (pY + startY - ftlObj.y)/8;
ftlObj.sP(ftlObj.x, ftlObj.y);
setTimeout("stayTopLeft()", 40);
}
ftlObj = ml("divStayTopLeft");
stayTopLeft();
}
JSFX_FloatTopLeft();
</script>
<!-- ********************************************************* -->
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR><BR>
<!-- ********************************************************* -->
</body>
</html>