|
-
Apr 28th, 2002, 06:25 PM
#1
Thread Starter
Hyperactive Member
link?
how can i make a link that moves down and to the left when your mouse moves over it?
-
Apr 29th, 2002, 04:34 AM
#2
Fanatic Member
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>
-
Apr 29th, 2002, 07:20 PM
#3
Thread Starter
Hyperactive Member
that wasnt it. its supposed to move down and to the left and come back after you come off the link
-
Apr 29th, 2002, 09:09 PM
#4
Frenzied Member
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.
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Apr 29th, 2002, 09:24 PM
#5
Thread Starter
Hyperactive Member
i just think it looks cool i think it might be a java but im not sure
-
Apr 30th, 2002, 03:44 AM
#6
Fanatic Member
Punk, I would use a div instead of a span
Good Point, <div> would be better
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|