Multiple (not multi-level) CSS drop down menus
Posted: Thu Sep 22, 2005 2:45 pm
Ok, I don't understand why this doesn't work in IE6:
It works perfectly in FF, and only 1 list (first one: Home) works on IE, the other ones don't show when hovered over them...
Anyone know why this is happening?
Code: Select all
</script>
<style type="text/css">
<!--
html,body {
margin: 5px;
padding: 0;
font-size: 10px;
font-family: Arial;
background-color: #D7D7D7;
}
.tdtop {
background: #fff;
font-weight: bold;
border: 0px solid #000;
}
TD {
font-face: Arial;
font-size: 10px;
background-color: #FFF;
height: 26px;
}
INPUT, TEXTAREA, SELECT, OPTION {
font-family: Arial;
font-size: 10px;
}
#nav {
float: left;
}
#footer {
width: 922px;
height: 18px;
border: 1px solid #000;
background: #FFF;
padding: 3px;
text-align: left;
}
.sep {
float: left;
margin: 0;
padding: 0;
width: 5px;
}
ul {
margin: 0;
padding: 0;
list-style: none;
width: 80px; /* Width of Menu Items */
border-bottom: 1px solid #000;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 0;
top: 24px;
display: none;
}
/* Styles for Menu Items */
ul li a {
display: block;
text-decoration: none;
color: #000;
background: #fff; /* IE6 Bug */
padding: 5px;
border: 1px solid #000;
border-bottom: 0;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */
ul li a:hover { color: #E2144A; background: #f9f9f9; } /* Hover Styles */
li ul li a { padding: 2px 5px; } /* Sub Menu Styles */
li:hover ul, li.over ul { display: block; } /* The magic */
</style>
</head>
<body>
<div align="center">
<div style="width: 930px;">
<ul id="nav">
<li><a href="index.php">Home</a>
<ul>
<li><a href="experiences.php">Experiences</a></li>
</ul>
</li>
</ul>
<div class="sep"> </div>
<ul id="nav">
<li><a href="clients.php">Clients</a>
</li>
</ul>
<div class="sep"> </div>
<ul id="nav">
<li><a href="accounts.php?status=all">Accounts</a>
<ul>
<li><a href="accounts.php?status=0">Pending</a></li>
<li><a href="accounts.php?status=2">Active</a></li>
<li><a href="accounts.php?status=3">Expired</a></li>
</ul>
</li>
</ul>Anyone know why this is happening?