在Firefox中,此代码并排呈现Test和Test2,但在Chrome和IE Edge中,它们垂直堆叠。哪个是对的?我怎样才能让他们并排在Firefox中。在Chrome/IE Edge中使用`display:table`和`display:table-cell`到<fieldset>
代码如下:
.grid,
.row,
.column,
.cell {
box-sizing: border-box;
}
.column {
vertical-align: top;
}
.row {
display: table;
table-layout: fixed;
width: 100%;
}
.cell {
display: table-cell;
margin: 0;
vertical-align: top;
}
.half {
width: 50%;
}
<fieldset class='row'>
<legend class=title>Foo</legend>
<fieldset class='cell half'>
<legend class=subtitle>bar</legend>
Test
</fieldset>
<fieldset class='cell half'>
<legend>baz</legend>
Test2
</fieldset>
</fieldset>
这就是我不想做虽然这就是表格和表格单元的意图 – nwmcsween