div tag height - IE<>firefox
Hej!Jeg har problemer med at en div tags højde på f.eks. 3 px bliver vist som meget bredere i IE end i Firefox.
Er der nogle som kan se problemet i koden.
Se flg link, hvor den orange bar hedder #test og har højden 3 px men bliver vist som ca 10 px, mens den i Firefox har den rigtige højde:
http://multimedie-users.edu.ats.dk/moso/
Kode:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
* {
margin: 0;
padding: 0;
}
#test {
background-color: #FFCA8E;
height: 3px;
width: 950px;
float: left;
}
body {
background-color: #FFFFFF;
}
#wrapper {
text-align: left;
width: 950px;
margin-right: auto;
margin-left: auto;
height: 500px;
}
#header {
padding: 0px;
height: 161px;
width: 950px;
background-image: url(images/skovnat1.jpg);
float: left;
}
#left1 {
margin: 0px;
padding: 0px;
height: 24px;
width: 46px;
float: left;
background-image: url(images/skovnat2.jpg);
}
#kompetencer {
float: left;
width: 166px;
height: 24px;
}
#forside {
margin: 0px;
padding: 0px;
height: 24px;
width: 94px;
float: left;
}
#links {
float: left;
width: 74px;
height: 24px;
}
#tools {
float: left;
height: 30px;
background-color: #ECECEC;
width: 140px;
}
#kontakt {
float: left;
background-color: #ECECEC;
height: 30px;
width: 153px;
}
#right1 {
float: left;
background-image: url(images/skovnat3.jpg);
width: 570px;
height: 24px;
}
#design {
float: left;
height: 30px;
background-color: #ECECEC;
width: 107px;
}
#interesser {
float: left;
background-color: #ECECEC;
height: 30px;
width: 133px;
}
#right2 {
float: left;
background-color: #ECECEC;
height: 30px;
background-image: url(images/skovnat4.jpg);
width: 417px;
background-repeat: no-repeat;
}
-->
</style>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('images/forside_red.gif','images/kompetence_red.gif','images/links_red.gif','images/tools_red.gif','images/design_red.gif','images/interesser_red.gif','images/kontakt_red.gif')">
<div id="wrapper">
<div id="header"></div>
<div id="left1"></div>
<div id="forside"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image3','','images/forside_red.gif',1)"><img src="images/forside_sort.gif" name="Image3" width="94" height="24" border="0" id="Image3" /></a></div>
<div id="kompetencer"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image4','','images/kompetence_red.gif',1)"><img src="images/kompetence_sort.gif" name="Image4" width="166" height="24" border="0" id="Image4" /></a></div>
<div id="links"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image5','','images/links_red.gif',1)"><img src="images/links_sort.gif" name="Image5" width="74" height="24" border="0" id="Image5" /></a></div>
<div id="right1"></div>
<div id="tools"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image7','','images/tools_red.gif',1)"><img src="images/tools_sort.gif" name="Image7" width="140" height="24" border="0" id="Image7" /></a> </div>
<div id="design"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image8','','images/design_red.gif',1)"><img src="images/design_sort.gif" name="Image8" width="107" height="24" border="0" id="Image8" /></a></div>
<div id="interesser"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image9','','images/interesser_red.gif',1)"><img src="images/interesser_sort.gif" name="Image9" width="133" height="24" border="0" id="Image9" /></a></div>
<div id="kontakt"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Image12','','images/kontakt_red.gif',1)"><img src="images/kontakt_sort.gif" name="Image12" width="153" height="24" border="0" id="Image12" /></a></div>
<div id="right2"></div>
<div id="test"></div>
</div>
</body>
</html>
