我有一个表单,其中有字段集,在 1 个字段集中我有一张表。该表将位于 chrome 和 IE 的字段集中,但不位于 Firefox 中。请看:
https://jsfiddle.net/79504g5b/1/
我的字段集有这个 CSS:
#msform fieldset {
background: white;
border: 0 none;
border-radius: 3px;
box-shadow: 0 0 15px 1px rgba(0, 0, 0, 0.4);
padding: 20px 30px;
box-sizing: border-box;
width: 80%;
margin: 0 10%;
/*----------------------->2*/ position: absolute;
}
不知道是什么问题
最佳答案
.statusHead1
元素不占用可用宽度。因此,table
被添加到它旁边的可用空间中。
要在它自己的行上移动 table
,请在 table
上使用 clear: both
。
table {
clear: both;
}
参见 Demo .
可选地,您还可以将 float: left
设置为 table
。
我建议您使用clear: both
。使用它,您不必更改其他元素结构/ View 。
关于javascript - 仅在 Firefox 中表格超出字段集边界,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32044189/