【问题标题】:Table in IE7 with 100% width overflowing containing divIE7 中 100% 宽度溢出包含 div 的表格
【发布时间】:2011-06-11 05:46:15
【问题描述】:

我在区域 div 中有一个结果表。因为我使用的是流体布局,所以区域 div 没有设置宽度。表格的宽度设置为 100%,但在 IE7 中它超出了包含的 div。有什么想法吗?

HTML:

<div id="area">
    <table id="results">
    </table>
</div>

CSS:

#results{
    width: 100%;
}

【问题讨论】:

    标签: html css html-table width internet-explorer-7


    【解决方案1】:

    知道了!我需要为表中的所有 TD 和 TH 设置 white-space:normal。

    【讨论】:

    • 太棒了,我在维护的页面上遇到了与 IE 相同的问题。不要忘记接受你的答案!
    【解决方案2】:

    您需要将zoom: 1 提供给表#area { zoom: 1 } 的父&lt;div&gt;

    【讨论】:

      猜你喜欢
      • 2012-01-26
      • 2011-09-29
      • 2017-11-01
      • 1970-01-01
      • 1970-01-01
      • 2017-03-02
      • 1970-01-01
      • 1970-01-01
      • 2010-09-13
      相关资源
      最近更新 更多