gracias por responder stingofung. aqui te dejo mi codigo que he modificado.
Código HTML:
Ver original<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es"> <meta http-equiv="Content-Type" content="text/html;charset=utf-8" /> div#nav_menu {
width:374px;
height:auto;
overflow: hidden;
}
ul#nav {
margin:0;
padding:0;
list-style:none;
clear:left;
}
ul#nav li {
width:60px;
height:25px;
background-color:#d78a56;
font-family:Arial, Helvetica, sans-serif;
color:#ef7a1a;
font-size:12px;
margin-bottom:10px;
}
ul#nav li.menu1 {
width:70px;
height:25px;
background-color:#b7733b;
font-family:Arial, Helvetica, sans-serif;
color:#ef7a1a;
font-size:12px;
margin-bottom:10px;
}
ul#nav li.menu2 {
width:70px;
height:25px;
background-color:#915618;
font-family:Arial, Helvetica, sans-serif;
color:#ef7a1a;
font-size:12px;
margin-bottom:10px;
}
ul#nav li.menu3 {
width:70px;
height:25px;
background-color:#76461b;
font-family:Arial, Helvetica, sans-serif;
color:#ef7a1a;
font-size:12px;
margin-bottom:10px;
}
/* sufijos
-top (superior), right (derecha), -bottom (inferior), left (izquierda): */
ul#nav li a {
color:#d78a56;
display: block;
text-decoration:none;
background:none;
/* background-color:#FFFFFF;*/ /*comente el background porque de alli no se mueve la barra del menu.*/
padding: 5px 0px 0px 12px;
margin-left: 40px;
width: 170px;
height: 20px;
}
ul#nav li a.active {
margin-left:70px;
}
<script src="jquery-1.2.6.min.js" type="text/javascript"></script> <script type="text/javascript" language="javascript"> $(document).ready(function(){
$("#nav a").not(".active").hover(function(){
$(this).stop().animate({
marginLeft : "60px",
}, 500 );
},function(){
$(this).stop().animate({
marginLeft : "40px",
}, 500 );
});
});
<li><a href="#" class="active">accesories and casual piecies
</a></li> <li class="menu1"><a href="#">dinning
</a></li> <li class="menu2"><a href="#">bedroom
</a></li> <li class="menu3"><a href="#">living area
</a></li>
saludos.