ie6页面样式问题

时间:2011-04-04 04:40:43

标签: html css internet-explorer-6 cross-browser

Page是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

2 个答案:

答案 0 :(得分:1)

@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;
}

如果您开始注意到您更新/定义的任何样式使页面正常工作,我建议您使用conditional-comments进行IE6开始对其他浏览器产生负面影响。创建一个ie6.css文件并使用主CSS文件下面的条件注释,如下所示:

<!--[if lte IE 6]>
    <link rel="stylesheet" type="text/css" href="ie6.css" media="all">
<![endif]-->

答案 1 :(得分:0)

float:left添加到您的CSS可以解决问题。

.menuArea ul li a{
     float: left;
}

这已经过测试。

相关问题