Forum Moderators: not2easy
I thought the problem was that there were links that would be under where the subcategories would appear, and while that is a reason why the menus disappear, in IE6, they just don't pop up at all.
Any help at all would be greatly appreciated.
Here's my code:
HTML
<ul id="nav">
<li><a href="#">Civilian Site</a>
<ul>
<li><a href="#">Breathing</a></li>
<li><a href="#">Protective Clothing</a></li>
</ul>
</li>
<li><a href="#">Ergonomics</a>
<ul>
<li><a href="#">Back</a></li>
<li><a href="#">Matts</a></li>
</ul>
</li>
</ul>
CSS
ul {
margin: 0;
padding: 0;
list-style: none;
width: 175px;
font-family:Arial, Helvetica, sans-serif;
font-size:12px;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 174px;
top: 0;
display: none;
z-index:500;
}
ul li a {
display: block;
text-decoration: none;
font-weight:bold;
color: #ffffff;
background: #CB0202;
padding: 3px;
border-bottom: 0;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; }
* html ul li a { height: 1%; }
/* End */
li:hover ul, li.over ul {
display: block; }
li:hover ul, li.over ul {..
IE6 and below does not support
:hover on any element except the <a> element, this was always the problem for drop menus, and means IE6 needs something else, script or behavior, to help it work ;) You can use a "suckerfish" style JavaScript, which I think is what your CSS refers to.. li.over
- or you can plug in the whatever:hover behaviour file. The behavior file (Version 1.42.060206) should just need uploaded to your server, preferably same directory as your CSS file, and is referenced from the CSS like so:
body { behavior:url("csshover.htc"); } you can also place some JS directly in your CSS file, or in a conditional comment, which might be useful for testing. - see whatever:hover script in CSS [webmasterworld.com] - that link also has the link to the full behavior file
-Suzy
[edited by: SuzyUK at 9:53 am (utc) on Dec. 10, 2007]
However I am still having a problem. I have a div that holds the text for the page and in IE, when I move off the original list and into the pop up menu, the menu appears under the text in the div. I've tried z-index on my div and in the menu to fix the problem but it still persists. Any suggestions?