【问题标题】:Vertical Scrollbar not displaying in IE7/6 in Drupal website?Drupal 网站的 IE7/6 中不显示垂直滚动条?
【发布时间】:2012-01-23 21:45:20
【问题描述】:

我有一个 Drupal 站点,但我在 Internet Explorer 7 和 6 中发现了一个不显示垂直滚动条的问题。我将下面的代码添加到主题中的 style.css 文件中,但没有运气。还有其他解决方法吗?

html {
       overflow-y: scroll;
}

编辑:删除了上面的代码溢出代码,这是当前的html/body代码:(我刚刚指定了高度)

html {

}

body {
  font-family: Arial, Helvetica, Verdana, "Bitstream Vera Sans", sans-serif;
  font-size: 75%;
  height: 100%; margin-bottom: 1px;
}

【问题讨论】:

  • 你能发布更多的 CSS 吗?具体来说,任何#wrapper、html 或body 样式。
  • 尝试指定溢出:隐藏;溢出-y:滚动;
  • 你的 IE6 的 CSS 应该是 * { display: none; } ;)
  • 修复验证错误是一个不错的起点:validator.w3.org speeddawg results

标签: html css internet-explorer drupal scroll


【解决方案1】:

你有没有链接到网站或者css就麻烦了?提供的信息很难回答。当我遇到这样的问题时,我通常的方法是创建一个特定于浏览器的 css,这可以为您节省大量时间。在 drupal 7 中执行此操作是我从 here 获取的示例

drupal_add_css(path_to_theme() . '/css/ie.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'preprocess' => FALSE));
drupal_add_css(path_to_theme() . '/css/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'IE 6', '!IE' => FALSE), 'preprocess' => FALSE));

我发现使用 IE Developers Tools 和特定于浏览器的样式表修复这类错误通常更容易。

希望对您有所帮助。

【讨论】:

  • 网站是speeddawg.com - 感谢您的帮助!该问题已在 IE6 中使用height: 100%; margin-bottom: 1px; 代码修复。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-10-24
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多