...

View Full Version : CSS li Strange?



reubenb
11-02-2006, 01:16 PM
Hi!

In the following code in IE, the div menucontainer has a bigger height (downwards) then it should be. In all othe rbrowsers, including IE7 it looks fine.
can someone find me a work around, if it means having a seperate css for this?
have a look if you're not sure at
http://www.lynxas.com/clients/bonnetts/test.html


#menucontainer {
position:relative;
top:0px;
height: 23px;
width: 498px;
margin-right: auto;
margin-left: auto;
z-index: 5;
background-color:#999999;

}

#menu li
{
display: inline;
list-style-type: none;
padding-right: 10px;
margin-left: auto;
margin-right: auto;
font-family:Arial, Helvetica, sans-serif;
font-weight:normal;
color: #550000;
background-color:#000099;
text-decoration: none;
z-index: 6;

}

<div id="menucontainer"><div id="menu"><ul id="menu" align="center">
<li><a href="#">Test</a></li>
<li><a href="#">Test</a></li></ul></div>
</div>

_Aerospace_Eng_
11-02-2006, 01:38 PM
Keep things simple. No need for those excess divs.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
html, body {
margin:0;
padding:0;
border:0;
}
#menu {
width: 498px;
background-color:#999;
margin:0 auto;
padding:4px 0;
list-style:none;
text-align:center;
font-family:Arial, Helvetica, sans-serif;
font-size:14px;
}
#menu li
{
display: inline;
padding-right: 10px;
background-color:#009;
}
#menu li a, #menu li a:link, #menu li a:visited {
text-decoration:none;
color:#CCC;
}
#menu li a:hover, #menu li a:active {
color:#FFF;
}
</style>
</head>
<body>
<ul id="menu">
<li><a href="#">Test</a></li>
<li><a href="#">Test</a></li>
</ul>
</body>
</html>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum