【问题标题】:column background on table not displaying in ie6 and ie7表格上的列背景未在 ie6 和 ie7 中显示
【发布时间】:2011-10-08 16:03:41
【问题描述】:

我正在处理表格,每列都有一个背景,每个 td 和 th 都有一个位于底部的背景图像(只是虚线)作为某种分隔符。虽然这适用于所有当前的浏览器。 IE6 & IE7 拒绝显示我的专栏背景。

在尝试解决这个问题时,我删除了应用于每个 td 的虚线图像背景,它显示了列背景。所以基本上它要么是一个,要么是两个。有什么想法可以解决这个问题吗?

<colgroup id="col1"></colgroup>
<colgroup id="col2" class="slim"></colgroup>
<colgroup id="col3" class="slim"></colgroup>
<thead>
       <tr>
          <th class="none">&nbsp;</th>
          <th class class="divider">
              <h2>Test</h2>
              <p>Lorem ipsum</[>
          </th>
        </tr>
    </thead>

#col2{
    background: url("images/col2.png") repeat;
}

.divider {
    background: url("images/dotted-line.gif") no-repeat center bottom;
}

我知道 ie6 png 问题,但为什么它至少应该在 ie7 上工作,不应该,也许只是为 ie6 显示白色背景

【问题讨论】:

  • 这是 IE6/7 中的一个已知问题 - 另请参阅我的回答:stackoverflow.com/questions/4594916/…
  • 只是好奇。如果我们尝试用 代替 并在 上使用 span 属性,从而得到与 相同的效果,它会起作用吗?我当然认为 比 ie6 和 ie7 中的 得到更好的支持

标签: css xhtml internet-explorer-7 internet-explorer-6


【解决方案1】:

只是把它扔出去,但你可以在需要背景的 tdth 标签上扔一个类。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-12-16
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多