【问题标题】:CSS Layout not working in IE7 (all other browsers are fine)CSS Layout 在 IE7 中不起作用(所有其他浏览器都可以)
【发布时间】:2010-03-06 01:02:48
【问题描述】:

我正在开展一个项目,让大学可以完全控制源代码 (Drupal),而我所能做的就是在主题区域中覆盖 CSS。

我遇到的问题是标题没有停留在 IE7 中的应有位置。
IE8 与 Firefox、Chrome 和 Safari 完全符合预期。

这是我的 CSS 覆盖

#uc-splash div.uc-section, div.splash{width:790px !important; height:184px !important;}
#uc-navigation div.secondary, #uc-navigation div.secondary a { color: #fff;}
#uc-navigation .primary, #uc-navigation .secondary {background-color:#14195b !important;}
#uc-navigation div.secondary, #uc-navigation div.secondary a {color:#fff !important;}
#uc-navigation div.secondary, #uc-navigation div.secondary a:hover {  background-color: #1c6fb7; color:#fff;}
#uc-content div.secondary a{color: #14195b;}
#uc-content div.secondary .block h2 { background-color: #14195b; color: #ffffff; }
#uc-content div.secondary .block{background-color:#e4e8ed;}
#uc-navigation .secondary{background-color: #14195b!important;}

这里是有问题的页面。 http://wcmprod2.ucalgary.ca/mha_ipe/

任何帮助或指导将不胜感激。

【问题讨论】:

  • (...指标题)

标签: css drupal internet-explorer-7 themes


【解决方案1】:

由于某种原因,标题图像有一个 CSS 属性,它的边距为 -6px。添加这个

.logo img { margin-top: 0px !important; }

你应该很好。

【讨论】:

    【解决方案2】:

    我记得 IE7 中的表单标签有问题(显示填充和/或边距)

    尝试将此添加到您的 css...

    表格{边距:0;填充:0;}

    希望这会有所帮助...祈祷... :)

    【讨论】:

      【解决方案3】:

      如果您的意思是<div id="uc-header" class="uc-section header">,则使用“header”,那么您在此处显示的 CSS 没有寻址“uc-header”的属性。您应该覆盖 level-c.css 中的属性

      【讨论】:

        【解决方案4】:

        您应该首先包含一个重置,它会中和 HTML 元素的默认样式。让您更好地控制许多浏览器。

        http://developer.yahoo.com/yui/reset/

        【讨论】:

        • 我不能这样做,因为我不能在页眉中添加任何东西。
        猜你喜欢
        • 2014-08-13
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-04-23
        • 2017-04-07
        • 2019-11-27
        相关资源
        最近更新 更多