how can i make a link that moves down and to the left when your mouse moves over it?
Printable View
how can i make a link that moves down and to the left when your mouse moves over it?
You can move a hyperlink but its easier to put it in a layer..
Code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled</title>
<script language="JavaScript" type="text/javascript">
<!--
function findleft(objectID){
if (findDom(objectID).left){return findDom(objectID).left;}
if (findDom(objectID).pixelLeft){return findDom(objectID).pixelLeft;}
if (findDom(objectID).offsetLeft){return findDom(objectID).offsetLeft;}
return 'null';
}
function findtop(objectID){
if (findDom(objectID).top){return findDom(objectID).top;}
if (findDom(objectID).pixelTop){return findDom(objectID).pixelTop;}
if (findDom(objectID).offsetTop){return findDom(objectID).offsetTop;}
return 'null';
}
function findDom(objectID){
if (document.all){
return document.all(objectID);
} else if (document.getElementById){
return document.getElementById(objectID);
} else if (document.layers){
return (document.layers[objectID]);
}
}
//-->
</script>
</head>
<body>
<span style="position:absolute; left:50px; top:50px;" id="link1" onmouseover="this.style.left=findleft('link1')-10;this.style.top=findtop('link1')+10;"><a href="javascript://">This is a link</a></span>
</body>
</html>
that wasnt it. its supposed to move down and to the left and come back after you come off the link
So we tab to it, or just disable the JavaScript. Is there a reason behind silly browser tricks, Muk?
Punk, I would use a div instead of a span. The div is supposed to be the block layer, the span is meant to be inline. 'Course, either will technically work, it's just a matter of convention.
i just think it looks cool i think it might be a java but im not sure
Good Point, <div> would be better ;)Quote:
Punk, I would use a div instead of a span