CSS HOVER-IE
Hello I am tryig to get a menu done using css. Below is the code. I can see it on Firefox- but not IE. Seems weird to me. Could someone check and see what I have in the code that should not be there or what I am missing.
<script type="text/javascript"><![CDATA[//><!--
startList = function() {
if (document.all&&document.getElementById) {
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", "");
}
}
}
}
}
window.onload=startList;
//--><!]]></script>
<STYLE TYPE="text/css">
<!--
body {
font-family:arial,verdana,tahoma,helvetica;
font-size:12px;
}
#nav, #nav ul { /* all lists */
padding: 0;
margin: 0;
list-style: none;
float : left;
width : 11em;
}
#nav li { /* all list items */
position : relative;
float : left;
line-height : 1.50em;
margin-bottom : -1px;
width: 11em;
}
#nav li ul { /* second-level lists */
position : absolute;
float : left;
left:-111em;
margin-left : 11.05em;
margin-top : -1.35em;
display:none
}
#nav li a {
width: 11em;
w\idth : 10em;
display : block;
color : #FFFFCC;
font-weight : bold;
text-decoration : none;
background-color : #7799CC;
border : 1px solid maroon;
padding : 0 0.5em;
}
#nav li:hover ul, li.over ul {
display: block; }
#nav li a:hover {
color : #FFFFCC;
background-color : maroon;
}
#nav li:hover ul, #nav li li:hover ul, #nav li li li:hover ul, #nav li.sfhover ul, #nav li li.sfhover ul, #nav li li li.sfhover ul { /* lists nested under hovered list items */ left: auto;
}
#content {
margin-left : 12em;
}
# nav ul, li, li a {box-sizing:content-box; vertical-align:bottom;}
H1 { text-align: center; text-decoration: none;}
H2 { text-align: left; color:#4682B4; font-size:large; text-decoration: none;}
H3 { text-align: justified; color:#maroon; font-size:large; text-decoration: none;}
H6 { text-align: center; color:#FFFFCC; font-size:small; text-decoration: none;}
CDATA {font-family: sans-serif, verdana ; font-size:large;}
CDATA {font: 110% sans-serif;}
--></STYLE>
<!--[if IE]>
<style type="text/css" media="screen">
body {
behavior: url(csshover.htc);
font-size: 90%;
}
#menu ul li {float: left; width: 100%;}
#menu ul li a {height: 1%;}
#menu a, #menu h2 {
font: bold 0.2em/0.4em arial, verdana, sans-serif;
}
</style>
<![endif]-->
</HEAD>
I would very much appreciate any help. Thank you
|