hola a todos.. tengo un simple menu. el cual es un objeto que se desplaza al elemento del menu que seleccionemos, pero tengo problemas al tratar de hacerlos bien en todos los navegadores especialmente en IE8.. este es el codigo:
Código HTML:
Ver original#opciones-menu{
-moz-border-radius: 20px 20px 20px 20px;
background-repeat: repeat-y;
height:20px;
left: 0;
position:relative;
top: 0;
margin:20px 0px 0px 0px;
padding-top:20px;
padding-bottom:20px;
width: 985px;
}
#opciones-menu ul{
}
#opciones-menu ul li{
display:block;
float:left;
width:200px;
list-style:none;
margin-left:20px;
background: #11a5c0;
background: -webkit-gradient(linear, 0 0, 0 bottom, from(#EEFF99), to(#0f788c));
background: -webkit-linear-gradient(#11a5c0, #0f788c);
background: -moz-linear-gradient(top, #11a5c0 0%, #0f788c 100%);
background: -ms-linear-gradient(#11a5c0, #0f788c);
background: -o-linear-gradient(#11a5c0, #0f788c);
background: -ms-linear-gradient(top, #11a5c0 0%,#0f788c 100%); /* IE10+ */
background: linear-gradient(#11a5c0, #0f788c);
-pie-background: linear-gradient(#11a5c0, #0f788c);
behavior: url(PIE.htc);
}
#opciones-menu ul li a{
color:white;
font-family:Trebuchet MS;
text-decoration:none;
}
#opciones-menu ul li .home:hover{
color:#DA230A;
}
#contenedor{
width:100%;
}
#barra_mov{
margin-left:440px;
position:absolute;
top:15px;
width:40px;
height:15px;
background: #87e0fd; /* Old browsers */
-moz-border-radius:10px 10px 10px 10px;
border-radius: 10px 10px 10px 10px;
behavior: url(PIE.htc);
}
#barra_todo{
position:relative;
height:25px;
width:655px;
left:-32px;
margin:0px 0px 25px 0px;
margin-left:20px;
}
<script src="jquery-1.5.js" type="text/javascript"></script> <script type="text/javascript"> function mover(argumento){
var longitud = new Array(4);
if(navigator.userAgent.toLowerCase().indexOf('chrome') > -1){
longitud[0] = 10;
longitud[1] = 214;
longitud[2] = 440;
longitud[3] = 660;
}else if (navigator.appName.indexOf("Explorer") != -1) {
longitud[0] = -200;
longitud[1] = 214;
longitud[2] = 380;
longitud[3] = 660;
}else{
longitud[0] = 0;
longitud[1] = 214;
longitud[2] = 440;
longitud[3] = 660;
}
switch(argumento){
case 1:
// var ultimo = longtud[0]+"%";
jQuery("#barra_mov").animate({
marginLeft: longitud[0]+"px"
},333 );
break;
case 2:
jQuery("#barra_mov").animate({
marginLeft: longitud[1]+"px"
}, 333 );
//sentencias
break;
case 3:
jQuery("#barra_mov").animate({
marginLeft: longitud[2]+"px"
}, 333 );
//sentencias
break;
default:
jQuery("#barra_mov").animate({
marginLeft: longitud[3]+"px"
}, 222 );
//sentencias
}
}
<div id="contenedor" align="center"> <li><a id="hom" onmouseover="mover(1);" href="home.php">Home
</a></li> <li><a id="sol" onmouseover="mover(2);" href="#">Soluciones
</a></li> <li><a id="ser" onmouseover="mover(3);" href="javascript:void(0)">Servicios
</a></li> <li><a id="con" onmouseover="mover(4);" href="contac.php">Contacto
</a></li> <div id="barra_mov" style=""></div>
alguna sugerencia,consejo ??¿¿?
saludos y graciasss!!!