【问题标题】:In Firefox table margins don't collapse在 Firefox 表格边距不折叠
【发布时间】:2012-01-04 15:15:21
【问题描述】:

我创建了this fiddle 来演示这个问题。表格边距在 Firefox 中不会折叠,而在 Chrome 和 IE 中会折叠。

火狐

Chrome 和 IE

这个问题有解决办法吗?

【问题讨论】:

  • 不管怎样,这个错误已在 Firefox 10 中得到修复。

标签: css firefox cross-browser margin


【解决方案1】:

Firefox 不是 collapsing vertical margintable's,因为 http://www.fiveminuteargument.com/margin-collapse-tables

像这样在表格中写display:block

section, div, table {
    margin: 1em;
    display:block;
}

查看这个例子http://jsfiddle.net/fhhWd/2/

【讨论】:

猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2010-10-10
  • 2017-07-27
  • 2014-05-15
  • 2013-06-09
  • 2019-08-16
  • 2010-09-11
  • 2011-02-09
相关资源
最近更新 更多