I want my <fieldset>
elements to behave like vanilla <div>
's by filling their containing element and showing a scrollbar when they are set to overflow: auto
.
For instance, I don't see why the fieldset in this example is wider than its containing div:
<div class=outer>
<fieldset class=inner>
fooooooooooooooooooooooooooooooooooooo
</fieldset>
</div>
<div class=outer>
<div class=inner>
fooooooooooooooooooooooooooooooooooooooo
</div>
</div>
and corresponding css:
.outer {
width: 60px;
}
.inner {
overflow: auto;
display: block;
height: 60px;
border: 1px solid red;
}
It turns out the culprit (in some cases) was the user-agent stylesheet in webkit was setting:
fieldset {
min-width: -webkit-min-content;
}
setting min-width: 0;
in the stylesheet corrected the issue in Chrome 27, Safari 6.0.2, and WebKit Nightly r146031. It fails to correct the issue in Chrome 25 and FireFox 19.0.2.
Either way this does not solve the problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With