IE 6 does not support the ":hover" pseudo class for ANY element other than anchors. (<a href>)
Therefor, to accomplish the same results you have to use a little bit of javascript. Here is my preferred method.
Code:
<!--[if IE lte 6]>
<script type="text/javascript">
cmdHover = function() {
var cmdList = document.getElementById("cmd").getElementsByTagName("LI");
for (var i=0; i<cmdList.length; i++) {
cmdList[i].onmouseover=function() {
this.className+=" cmdhover";
}
cmdList[i].onmouseout=function() {
this.className=this.className.replace(new RegExp(" cmdhover\\b"), "");
}
}
}
if (window.attachEvent) window.attachEvent("onload", cmdHover);
</script>
<![endif]-->
That script would add the class "cmdHover" to all <li> thus making them "hoverable" with CSS.
You would need to define the styling for particular <li>'s in your css file like so...
Code:
div#dropdownmenu ul li:hover, div#dropdownmenu ul li.cmdHover {
list-style-type: none;
background-color: #000000;
}
You would need to add the highlighted. Keep in mind you would need to "copy" each :hover item and change the :hover to .cmdHover in your css...
Bookmarks