problema con menu desplegable
Publicado por luis (3 intervenciones) el 27/09/2006 22:36:03
hola bueno toi haciendo un menu html desplegable con estilo css que me he fijado en una web y resulta que con firefox me funciona y con iexplorer no, haber si encontrais el fallo
esto seria la parte de html, la lista vamos
<head>
<script type="text/javascript"></script>
<style type="text/css">
@import "estilo.css";
</style>
</head>
<body>
<ul id="nav">
<ul>
<li><a >Enlaces de interes</a>
<ul>
<li><a href="#">Deshielo</a></li>
<li><a href="#">Desertizacion</a></li>
<li><a href="#">Cambio climatico</a></li>
</ul>
</li>
<li><a>Conoce el tiempo en Aragon</a>
<ul>
<li><a href="#">Huesca</a></li>
<li><a href="#">Zaragoza</a></li>
<li><a href="#">Teruel</a></li>
</ul>
</li>
</ul>
</ul>
</body>
y el estilo que el problema debe de estar aqui pero nose cual es,..
ul {
margin: 0;
padding: 0;
list-style: none;
width: 200px;
border-bottom: 1px solid #478D59;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 198px;
top: 0;
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #478D59;
background: #ffffff;
padding: 5px;
border: 2px solid #478D59;
border-bottom: 0;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */
li:hover ul { display: block; }
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;
li:hover ul, li.over ul {
display: block; }
haber si sabeis cual puede ser el problema
un saludo y gracias
esto seria la parte de html, la lista vamos
<head>
<script type="text/javascript"></script>
<style type="text/css">
@import "estilo.css";
</style>
</head>
<body>
<ul id="nav">
<ul>
<li><a >Enlaces de interes</a>
<ul>
<li><a href="#">Deshielo</a></li>
<li><a href="#">Desertizacion</a></li>
<li><a href="#">Cambio climatico</a></li>
</ul>
</li>
<li><a>Conoce el tiempo en Aragon</a>
<ul>
<li><a href="#">Huesca</a></li>
<li><a href="#">Zaragoza</a></li>
<li><a href="#">Teruel</a></li>
</ul>
</li>
</ul>
</ul>
</body>
y el estilo que el problema debe de estar aqui pero nose cual es,..
ul {
margin: 0;
padding: 0;
list-style: none;
width: 200px;
border-bottom: 1px solid #478D59;
}
ul li {
position: relative;
}
li ul {
position: absolute;
left: 198px;
top: 0;
display: none;
}
ul li a {
display: block;
text-decoration: none;
color: #478D59;
background: #ffffff;
padding: 5px;
border: 2px solid #478D59;
border-bottom: 0;
}
/* Fix IE. Hide from IE Mac \*/
* html ul li { float: left; height: 1%; }
* html ul li a { height: 1%; }
/* End */
li:hover ul { display: block; }
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;
li:hover ul, li.over ul {
display: block; }
haber si sabeis cual puede ser el problema
un saludo y gracias
Valora esta pregunta


0