本文介绍了IE7显示问题:菜单中的表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我写了一个菜单样式,在IE8,FF3.6,GC7中工作正常。现在的问题是,我的老板希望它工作,甚至在IE7。我真的很努力使它工作在IE7,但无法得到相同的外观。

I Wrote a menu style which is working fine in IE8,FF3.6,GC7. Now the problem is, my boss want it to work even on IE7. I really tried hard to make it work on IE7, but unable to get the same look.

menu.css

a{outline:none;}

.menu {
margin:0;
display:table;
padding:0;
white-space:nowrap;
width:958px;
text-align:center;
font-size:12px;
font-weight:bold;
font-family: Arial, Helvetica, sans-serif;
height: 30px;
background: transparent url("../images/menubg.jpg") repeat-x top left;
border-bottom:4px solid #92C4E9;
border-right:2px solid #005D91;
border-left:2px solid #005D91;
}
.menu ul {
list-style:none;
margin:0;
padding:0;
display:table-row;
white-space:nowrap;
}
.menu ul li{
display:table-cell;
border-right:1px solid #005D91;
border-left:1px solid #005D91;
}
.menu ul a{
display:block;
padding:12px 5px 0 5px;
text-decoration:none;
height:26px;
margin: 0 3px 0 3px;    
color:#ffffff;  
}
.menu ul a:hover{
margin: 0 3px 0 3px;    
background:transparent url("../images/menubgover.jpg") repeat-x top left;

}
.menu li ul
{   
margin:0px;
padding:0px;
display:none;
position:absolute;
background-color:#15375f;
filter: alpha(opacity=85); 
-moz-opacity:0.85; 
-khtml-opacity: 0.85;
opacity: 0.85;

}
.menu li:hover ul
{
margin:0px;
padding: 15px 15px 0px 20px;
text-align:left;
line-height:0px;
display:block;
color:#fff;
}
.menu li li
{
list-style:none;
display:list-item;
border-right:0px;
border-left:0px;
padding:0px;
}
.menu li li a
{color:#92C4E9; text-decoration:none; padding:0; margin:0px; font-weight:normal;
}
.menu li li a:hover
{color:#92C4E9; text-decoration:underline; background:none; padding:0; margin:0px; font-weight:normal;}

.present{margin: 0 3px 0 3px;background:transparent url("../images/menubgover.jpg") repeat-x top left;}


推荐答案

IE7不支持,因此您必须以不同的方式重建菜单。

IE7 doesn't support display:table, so you have to rebuild the menu in a different way.

这篇关于IE7显示问题:菜单中的表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-27 10:40