Menu dropdown
De I-Vortex
Un menu:
- Item 1
- Item 2
- Item 2-1
- Item 2-2
El UL raiz tiene id="nav"
Hack para IExplorer 6:
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;
En el estilo de menu:
.menu ul li:hover ul, .menu ul li.over ul, .menu ul li:hover .menu_arrow, .menu ul li.over .menu_arrow {
display: block;
}
[editar] Para el bug de Explorer
* html ul li { float: left; }
* html ul li a { height: 1%; }
[editar] Links
Categorías: Tutoriales | CSS | Hacks
