页面为here
请告诉我如何解决这个问题……
我知道Dean Edwards' IE7 javascript,但它可能有些夸张,有没有简单的方法来解决我的问题?
我试过了:
<!--[if lte IE 7]>
<link rel="stylesheet" type="text/css" href="demo/css/ie6.css" media="all">
<![else]>
<link rel="stylesheet" type="text/css" href="demo/css/common.css" media="all">
<![endif]-->但它不起作用,所以我将其替换为:
<!--[if lte IE 7]>
<style type="text/css">
...
</style>
<![endif]-->目前,我仍然有问题的二级菜单,即here
发布于 2011-04-04 14:17:10
@Miranda:要在IE6中修复你的菜单,在你的CSS中更新以下规则--
.menuArea ul {
height: 38px;
width: 790px;
}
.menuArea ul li {
display: inline;
font-size: 13px;
line-height:2.7em;
list-style: none;
margin-right: 2px;
text-transform: capitalize;
}
.menuArea ul li a {
color: #383838;
display: block;
float: left;
height: 38px;
padding: 0 16px;
text-decoration: none;
}我建议您使用IE6的conditional-comments,如果您开始注意到为使页面工作而更新/定义的任何样式都会在其他浏览器中对其产生负面影响。创建一个ie6.css文件并在主CSS文件下面使用条件注释,如下所示:
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="ie6.css" media="all">
<![endif]-->发布于 2011-04-04 13:12:01
将float:left添加到css中可能会解决这个问题。
.menuArea ul li a{
float: left;
}这是经过测试的。
https://stackoverflow.com/questions/5534629
复制相似问题