Hola!
Tengo un script de un menú desplegable en mi web, lo testeo en Opera y va de lujo, lo pruebo en IE y va perfecto, lo pruebo en Firefox y ¡no va!
La web se estructura asi:
Index con la función en javascript en su header, el css y un include('buttons.html')
En el buttons está todo el script, metido en un div.
Por lo tanto, el buttons está dentro de index, y en el index está el js y el css, debería afectarle al buttons, ¿no?
Pongo aquí el script:
Head del index: Código PHP:
<link rel="stylesheet" type="text/css" href="estilo.css" />
<script type="text/javascript">
function Menu(id_Div,nombre) {
if(id_Div.className == nombre + "Oculto") {
id_Div.className = nombre + "Visible";
} else {
id_Div.className = nombre + "Oculto";
}
}
</script>
Parte del CSS donde se refiere al script Código PHP:
.AVisible {visibility: visible;}
.AOculto {visibility: hidden; margin-top: 15px;}
.BVisible {visibility: visible; margin-top: 0px;}
.BOculto {visibility: hidden; margin-top: -100px;}
.CVisible {visibility: visible; margin-top: 0px;}
.COculto {visibility: hidden; margin-top: -140px;}
.DVisible {visibility: visible; margin-top: -10px;}
.DOculto {visibility: hidden; margin-top: -125px;}
.EVisible {visibility: visible; margin-top: -0px;}
.EOculto {visibility: hidden; margin-top: -20px;}
.FVisible {visibility: visible; margin-top: 0px;}
.FOculto {visibility: hidden; margin-top: -20px;}
buttons.html: Código PHP:
<div id="but">
<a href="urlurlrulr" target="_blank">
<img src="imagenes/index_30.jpg" alt="" border="0"/>
<div id="DivA" class="AOculto">
</div></a>
<img src="imagenes/index_31.jpg" onclick="Menu(DivB, 'B')" alt=""/>
<div id="DivB" class="BOculto">
<table align="center" cellspacing="0">
<tr>
<td><p>Stocks</p></td>
<td><p>Renders</p></td>
</tr>
<tr>
<td><p>C4Ds</p></td>
<td><p>Bryces</p></td>
</tr>
<tr>
<td><p>Brushes</p></td>
<td><p>Fonts</p></td>
</tr>
</table></div>
<img src="imagenes/index_32.jpg" onclick="Menu(DivC, 'C')" alt=""/>
<div id="DivC" class="COculto">
<table align="center" cellspacing="0">
<tr>
<td><p>Firmas Nivel Bajo</p></td>
</tr>
<tr>
<td><p>Firmas Nivel Medio</p></td>
</tr>
<tr>
<td><p>Firmas Nivel Alto</p></td>
</tr>
<tr>
<td><p>Efectos, fonts, etc</p></td>
</tr>
</table></div>
<img src="imagenes/index_35.jpg" onclick="Menu(DivD, 'D')" alt=""/>
<div id="DivD" class="DOculto">
<table cellspacing="0">
<tr>
<td><p>Aprende a hacer firmas</p></td>
</tr>
<tr>
<td><p>Consejos para hacer un buen trabajo</p></td>
</tr>
<tr>
<td><p>Programas de Diseño Gráfico</p></td>
</tr>
</table></div>
<img src="imagenes/index_33.jpg" alt=""/>
<div id="DivE" class="EOculto">
<table cellspacing="0">
<tr>
<td><p>E</p></td>
</tr>
</table></div>
<img src="imagenes/index_34.jpg" alt=""/>
<div id="DivF" class="FOculto">
<table cellspacing="0">
<tr>
<td><p>F</p></td>
</tr>
</table></div>
</div>
No sé dónde está mi problema, de hecho, si pongo todo (css, función js y buttons) en el mismo archivo, un html simple, pues va perfectamente en Firefox, pero si lo pongo integrado en la web no va.