I tried to style a fieldset
element with display: flex
and display: inline-flex
.
However, it didn’t work: flex
behaved like block
, and inline-flex
behaved like inline-block
.
This happens both on Firefox and Chrome, but strangely it works on IE.
Is it a bug? I couldn’t find that fieldset
should have any special behavior, neither in HTML5 nor in CSS Flexible Box Layout specs.
fieldset, div {
display: flex;
border: 1px solid;
}
<fieldset>
<p>foo</p>
<p>bar</p>
</fieldset>
<div>
<p>foo</p>
<p>bar</p>
</div>