我刚刚花了一些时间试图弄清楚为什么某些表单内容在 IE8 和 IE9 中完全消失了。经过一番调查,似乎是将字段集设置为显示:表列的错误。如果我将 fieldset 设置为 display:table 或 display:block,那么一切都会再次正常显示。
在我的 IE8 和 IE9 虚拟机上测试此 html 时,我只能看到标题“不在字段集中”。如果我删除 fieldset 样式,我可以看到两者。
有人知道为什么会这样吗?
<html>
<head>
<style type="text/css">
fieldset
{
display: table-column;
vertical-align: top
}
</style>
</head>
<body>
<form>
<fieldset>
<div class="row">
<h6>Inside a fieldset</h6>
</div>
</fieldset>
<form>
<h6>Not inside a fieldset</h6>
</body>
</html>
最佳答案
display: table-column
意味着它的行为类似于 <col>
HTML 中的标记。 <col>
tag 是一个不可见的元素,用于指定列的属性,如样式等。它与 <td>
不同。 (即 display: table-cell
)。
你应该使用 table-cell
相反。
Source - Random832's answer in this SO Thread
编辑: table-column
仍然在 IE 7、FireFox 24、Chrome 和 Opera 15 中显示。它在 IE 8、9 和 10 中不起作用。
关于html - 显示 : table-column disappears entirely in IE8 & IE9 的字段集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19479871/