【问题标题】:Internet Explorer 8 problems with CSSInternet Explorer 8 的 CSS 问题
【发布时间】:2012-07-17 01:26:52
【问题描述】:

我只使用 Internet Explorer 8 时遇到问题。

我不知道为什么要添加我做的网站的链接(我是新手):

Website 如果您在 IE8 中单击“Candidaturas”,您会看到文本已损坏,样式不起作用,在 IE9、Firefox、Chrome、Safari 中……运行良好……我不知道为什么。

div#candidaturas div#content div#columna h8 {
   margin : 0;
   padding : 0;
   text-align : left;
   font-family : Arial;
   font-size : 11px;
   font-variant : normal;
   color : #555;
}

div#candidaturas div#content div#columna h7 {
   text-align : left;
   font-family : Arial;
   font-size : 14px;
   font-weight : bold;
   font-variant : normal;
   color : #ff6b00;
}

谁能帮帮我?

谢谢大家!

【问题讨论】:

  • 我会改变你设置元素的方式。试试#id 而不是div#id,这是一种更好的做法,而且工作得更快。我还建议避免三个 id 如此长的链接......你确定 #columna h6 不会工作吗?也可以尝试font: bold 14px Arial, sans-serif;,而不是将它们分成单独的属性:)
  • 我会证明你所说的。谢谢!

标签: html css internet-explorer-8


【解决方案1】:

没有h7h8 这样的标题。只有h1-h6。 IE8 和 IE7 不理解未知元素,也不给它们设置样式。

【讨论】:

  • 我会证明你所说的。谢谢!
【解决方案2】:

你不能有多个具有相同 id 的 div。

你应该使用 class .columna 而不是 id #columna

这将解决您的问题以及其他潜在的未来问题。

【讨论】:

  • 这是真的,但不是唯一的问题。
  • 我会提前清除代码,我在头上加了一个注释,不要再犯错误了。谢谢。
【解决方案3】:

IE8 可能无法识别h7h8 标签,因为它们不是标准。只有h6 是标准的。此外,您有多个具有相同 ID 的 Div。 div 必须有唯一的标识符。类可以有多个实例。

【讨论】:

  • 我想我应该早点刷新,我不会重复其他人。对不起!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-10-27
  • 1970-01-01
  • 2012-07-24
相关资源
最近更新 更多