html - 显示 : table-column disappears entirely in IE8 & IE9 的字段集

标签 html css internet-explorer internet-explorer-8 fieldset

我刚刚花了一些时间试图弄清楚为什么某些表单内容在 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相反。

W3C Spec

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/

相关文章:

xml - 为什么 Internet Explorer 在通过后退按钮返回页面时不显示正确的 XML 转换?

html - <a href =""> 在 IE 中不起作用,但在 chrome 中起作用

css - 有谁知道在 CSS3 转换后对 "fix"的破解 `background-attachment: fixed`?

asp.net - 如何在不访问代码的情况下将文档类型更改为标准模式?

html - CSS(尤其是 CSS3)允许使用百分比宽度吗?

html - 如何使一个div中的图像拉伸(stretch)到整个页面

CSS3 : Vertically centered page with margin 10 pixels

html - 我怎样才能解决这个问题?一个元素上的两个动画?

javascript - 触发 DIV 容器 onclick 而不是在内容中

javascript - 页面更改时 Div 滚动位置不会返回顶部