這是我的菜單,我有一個ie6的問題,事實上這是一個下拉菜單,子項目菜單在ie6中右移,使菜單無用...菜單jquery的子項向右移
這裏的html:
<div id="navigation">
<a href="<?php echo base_url();?>" class="single">Home</a>
<div class="menu_item">Azienda
<div class="submenu">
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
</div>
</div>
<div class="menu_item">Servizi
<div class="submenu">
<a href="#">Link</a>
<a href="#">Link</a>
<a href="#">Link</a>
</div>
</div>
</div>
這是CSS:
#navigation{
width: 905px;
height: 30px;
margin: 0px auto;
padding-left: 150px;
}
#navigation img{ float: left; vertical-align: top;}
.single {
float: left;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #bfcee3;
text-decoration: none;
padding-left: 10px; padding-right: 10px;
margin-top: 20px;
}
.single:hover{color: #fff;}
.menu_item{
padding-left: 10px; padding-right: 10px;
margin-top: 20px;
float: left;
height: 35px;
text-indent: 8px;
overflow: hidden;
position: relative;
z-index: 10000000;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
color: #bfcee3;
text-decoration: none;
}
.submenu{
position: absolute;
top: 15px;
}
.submenu a{
display: block;
width: 100px;
height: 15px;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
color: #bfcee3;
text-decoration: none;
}
.submenu a:hover{
/*background: #181818;*/
color: #fff;
}
.menu_item:hover{
overflow: visible;
/*background: #e0e0e0;
color: #181818;*/
}
這Jquery的:
$(".submenu").slideUp(100, function() {
$(".menu_item").css({overflow:'visible'})
});
$(".submenu").css({display:'none'});
$(".menu_item").hover(function(){
$(this).stop().animate({
marginTop: "0px"
}, 300, function() {
$(".submenu", this).slideDown(300);
});
}, function() {
$(".submenu", this).slideUp(300, function() {
$(this).parent().stop().animate({
marginTop: "20px"
}, 300);
});
}
);
IMO - 如果可能,請勿容納IE6。你只是在延續這個問題。給你的用戶一個消息告訴他們升級。 = d – Jason 2011-02-04 20:47:41