Forum Moderators: not2easy
// JavaScript Document
startList = function()
{
navRoot = document.getElementById("nav");
for (i=0; i<navRoot.childNodes.length; i++)
{
node = navRoot.childNodes[i];
if (node.nodeName=="LI")
{
node.onmouseover=function()
{
this.className+=" over";
}
node.onmouseout=function()
{
this.className=this.className.replace(" over","out");
}
}
}
}
window.onload=startList;
only IE6 needs that javascript now, that's why it's working in all other browsers..
in the JS try changing:
navRoot = document.getElementById("nav");
to
navRoot = document.getElementById("menu");
your 'nav wrapper' div seems to be #menu according to your CSS
add the id "nav" to the menu ul - <ul id="nav">
then change you CSS slightly to remove some unnecessary stuff and to make the drop down lists be the right width in IE6
#menu {
background:url(images/main_menu.gif) repeat-x;
padding:0 0 0 155px;
margin:0;
height:27px;
text-align:center;
}
#menu ul {
padding:0;
margin:0;
list-style:none;
}
#menu ul li {
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
color:#FFF;
font-weight:bold;
position:relative;
float:left;
padding:0px 10px;
}
#menu ul li a {
display:block;
padding:5px 0px;
line-height:15px;
}#menu ul li ul {
display:none;
position:absolute;
top:25px;
background-color:#0d6cae;
width: 100px;
text-align: left;
}
#menu ul li:hover ul, #menu ul li.over ul {
display:block;
}
if that still doesn't work properly in IE6.. i.e. your menus are sticking or not disappearing on mouse out
change the last two rules to..
#menu ul li ul {
display:none;
position:absolute;
}
#menu ul li:hover ul, #menu ul li.over ul {
display:block;
position:absolute;
top:25px;
background-color:#0d6cae;
width: 100px;
text-align: left;
}
this just swaps some things known to trigger IE6 bugs to the hover/display rule