Nieuw lid |
|
Ik heb een site. Hierbij wil ik een mouseover instaleren die een thumb laat zien. Alleen heeft hij nog wat kuren in Firefox. Want zoals je kunt zien plaatst hij de thumb niet bij je muis aanwijzer maar stopt hij hem letterlijk in de div die ik heb aangemaakt voor die mouseover thumb. Nu weet ik al dat het aan mijn doctype ligt want bij deze doctype werkt hij niet:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
Maar bij deze of geen doctype werkt hij wel:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
En hier nog mijn Javascript, CSS en HTML:
Javascript:
Xoffset= 20;
Yoffset= 20;
var old,skn,iex=(document.all),yyy=-1000;
var ns4=document.layers
var ns6=document.getElementById&&!document.all
var ie4=document.all
if (ns4)
skn=document.div_popupimg
else if (ns6)
skn=document.getElementById("div_popupimg").style
else if (ie4)
skn=document.all.div_popupimg.style
if(ns4)document.captureEvents(Event.MOUSEMOVE);
else{
skn.visibility="visible"
skn.display="none"
}
document.onmousemove=get_mouse;
function popup(msg,bak){
var content="<img src="+msg+"></img>";
yyy=Yoffset;
if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"}
if(ns6){document.getElementById("div_popupimg").innerHTML=content;skn.display=''}
if(ie4){document.all("div_popupimg").innerHTML=content;skn.display=''}
}
function get_mouse(e){
var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft;
skn.left=x+Xoffset;
var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop;
skn.top=y+yyy;
}
function kill(){
yyy=-1000;
if(ns4){skn.visibility="hidden";}
else if (ns6||ie4)
skn.display="none"
}
Xoffset= 20; Yoffset= 20; var old,skn,iex=(document.all),yyy=-1000; var ns4=document.layers var ns6=document.getElementById&&!document.all var ie4=document.all if (ns4) skn=document.div_popupimg else if (ns6) skn=document.getElementById("div_popupimg").style else if (ie4) skn=document.all.div_popupimg.style if(ns4)document.captureEvents(Event.MOUSEMOVE); else{ skn.visibility="visible" skn.display="none" } document.onmousemove=get_mouse; function popup(msg,bak){ var content="<img src="+msg+"></img>"; yyy=Yoffset; if(ns4){skn.document.write(content);skn.document.close();skn.visibility="visible"} if(ns6){document.getElementById("div_popupimg").innerHTML=content;skn.display=''} if(ie4){document.all("div_popupimg").innerHTML=content;skn.display=''} } function get_mouse(e){ var x=(ns4||ns6)?e.pageX:event.x+document.body.scrollLeft; skn.left=x+Xoffset; var y=(ns4||ns6)?e.pageY:event.y+document.body.scrollTop; skn.top=y+yyy; } function kill(){ yyy=-1000; if(ns4){skn.visibility="hidden";} else if (ns6||ie4) skn.display="none" }
CSS:
#div_popupimg {
z-index: 2;
position: absolute;
visibility: hidden;
border: none;
width: 110px;
height: 110px;
}
#div_popupimg { z-index: 2; position: absolute; visibility: hidden; border: none; width: 110px; height: 110px; }
xHTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="Language" content="Nederlands" />
<meta name="Description" content="Speltotaal de next-gen spellensite!" />
<meta name="Keywords" content="spel, spele, spelen, speltotaal, speeltotaal, next-gen, spellensite, spellesite, flash, games, game, flashgames, avontuur, puzzel, actie, sport, race, intotaal, registreren, favorieten, Bikemania" />
<meta name="Subject" content="Spellensite" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Speltotaal.nl | <?php echo $lokatie; ?></title>
<link href="style.css" rel="stylesheet" type="text/css" />
<link href="rating.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" language="JavaScript" src="js/dropdown.js"></script>
<script type="text/javascript" language="Javascript" src="js/behavior.js"></script>
<script type="text/javascript" language="Javascript" src="js/rating.js"></script>
</head>
<body>
<div id="div_popupimg"><!-- No content --></div>
<script language="JavaScript" src="js/popupimg.js"></script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta name="Language" content="Nederlands" /> <meta name="Description" content="Speltotaal de next-gen spellensite!" /> <meta name="Keywords" content="spel, spele, spelen, speltotaal, speeltotaal, next-gen, spellensite, spellesite, flash, games, game, flashgames, avontuur, puzzel, actie, sport, race, intotaal, registreren, favorieten, Bikemania" /> <meta name="Subject" content="Spellensite" /> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Speltotaal.nl | <?php echo $lokatie; ?></title> <link href="style.css" rel="stylesheet" type="text/css" /> <link href="rating.css" rel="stylesheet" type="text/css" /> <script type="text/javascript" language="JavaScript" src="js/dropdown.js"></script> <script type="text/javascript" language="Javascript" src="js/behavior.js"></script> <script type="text/javascript" language="Javascript" src="js/rating.js"></script> </head> <body> <div id="div_popupimg"><!-- No content --></div> <script language="JavaScript" src="js/popupimg.js"></script>
<a ONMOUSEOVER="popup('<img src="http://thumb.jpg">','0')" ONMOUSEOUT="kill()" href="game.php?game=7">Biljarten<a><br />
<a ONMOUSEOVER="popup('<img src="http://thumb.jpg">','0')" ONMOUSEOUT="kill()" href="game.php?game=7">Biljarten<a><br />
Wie kan mij hier bij helpen?
|