Layout problemer med I.E 5.0
Følgende ser korrekt ut i opera 7.0 og I.E 6.0, men når jeg ser på siden med I.E 5.0 "Main Box" mye bredere enn "Top Banner". Noen som kan se hvorfor dette ikke virker i I.E 5.0??Siden kan sees her:
http://www.lilacsky.com/test.html
Og her er kildekoden:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "DTD/xhtml1-transitional.dtd">
<html>
<head>
<style type="text/css">
.content {
position:relative;
width:auto;
min-width:120px;
margin:9px 0px 9px 170px;
border:1px solid black;
background-color:white;
padding:10px;
z-index:3;
}
#navAlpha {
position:absolute;
width:135px;
top:81px;
left:10px;
border:1px solid black;
background-color:white;
padding:10px;
z-index:2;
/* Here is the ugly brilliant hack that protects IE5/Win from its own stupidity.
Thanks to Tantek Celik for the hack and to Eric Costello for publicizing it.
IE5/Win incorrectly parses the "\"}"" value, prematurely closing the style
declaration. The incorrect IE5/Win value is above, while the correct value is
below. See http://glish.com/css/hacks.asp for details. */
voice-family: "\"}\"";
voice-family:inherit;
width:135px;
}
/* I've heard this called the "be nice to Opera 5" rule. Basically, it feeds correct
length values to user agents that exhibit the parsing error exploited above yet get
the CSS box model right and understand the CSS2 parent-child selector. ALWAYS include
a "be nice to Opera 5" rule every time you use the Tantek Celik hack (above). */
body>#navAlpha {width:135px;}
#banner {
background:#fff;
height:40px;
border-top:1px solid #000;
border-right:1px solid #000;
border-left:1px solid #000;
border-bottom:1px solid #000;
voice-family: "\"}\"";
voice-family: inherit;
height:39px;
}
</style>
</head>
<body>
<div id="banner"><h1>Top Banner</h1></div>
<div id="navAlpha"><table width='100%'>
<th>::Menu::</th>
<tr><td>Menu Item 1<br>Menu Item 2</td></tr>
</table></div>
<div class="content">
<table width='100%'>
<th>::Main Box::</th>
<tr><td>This is the main box content</td></tr>
</table></div>
</body>
</html>
