¿Podeis ayudarme? Gracias. Os dejo el menú y el script.
Código HTML:
Ver original
Código CSS:
Ver original
#navlist { border: 0; margin: 0; padding: 0; list-style-type: none; text-align: center; } #navlist li { display: block; float: left; text-align: center; padding: 0; margin: 0; } #navlist li a { font:Arial, Helvetica, Geneva, Swiss, SunSans-Regular; font-size:16px; background: #006ab3; width: 8.72em; height: 25px; border: 1px solid black; padding: 0; margin-top: 0px; margin-left: 0px; margin-right: 0px; display: block; color: white; text-decoration: none; text-align:center; } #navlist li a:hover { background: #ffd800; color: #006ab3; } #navlist li a:active { background: #ffd800; color: #006ab3; } #navlist .selecionado { background: #ffd800; color: #006ab3; } #navlist li:hover ul, li.over ul{ display: block; } ul#navlist ul{ display:none; }
Código Javascript:
Ver original
startList = function() { if (document.all&&document.getElementById) { navRoot = document.getElementById("navlist"); 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;