【问题标题】:ie6 page style problemie6页面样式问题
【发布时间】:2011-04-25 21:17:06
【问题描述】:

页面是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

【问题讨论】:

  • IE6 应该从地球上被驱逐出去 - UPGRADE!
  • 升级只会让开发者无法为仍然停留在 IE6 上的客户和潜在客户测试和修复网站。

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


【解决方案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;
}

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

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

【讨论】:

    【解决方案2】:

    float:left 添加到您的css 可能会解决问题。

    .menuArea ul li a{
         float: left;
    }
    

    这是经过测试的。

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-09-21
    • 1970-01-01
    • 1970-01-01
    • 2013-04-14
    • 2022-07-25
    • 2013-05-20
    • 2020-05-22
    相关资源
    最近更新 更多