views:

57

answers:

1

Hi there,

The top menu on my website www.dhtherapies.com doesn't work in IE7 - any ideas. I've tried adding padding, which is how it was fixed in firefox when it was doing the same thing, but can't workout how to do it for IE7 - ideas?

Cheers

This is the css for IE7

/* CSS Document */

div.moduletable div {
zoom: 1;
}

div.moduletable2 div {
zoom: 1;
}

#top {
margin-left: 0px; 

}

#hornav ul li ul {
margin-left: -20px; 
}

#hornav ul li ul ul {
   margin: -30px 0px 0px 10.3em;
}


#hornav li:hover {
    z-index:1;
    background-position: 0 0;
    }

#hornav ul li li a {margin-top:0px; }
#hornav ul li ul {margin-top: 0px; }
A: 

not sure about the menu but this line throws a javascript error in IE7 (or IE8 in compatibility mode)

var menu_li_els = document.getElementById('hornav').firstChild.childNodes;

because there are no children...

if you revise it to this it should be ok

var menu_nav = document.getElementById('hornav');
if(menu_nav.childNodes.length > 0){
  var menu_li_els = menu_nav.firstChild.childNodes;
  //... do stuff here...
}
scunliffe