I am attempting to make a fieldset
child stretch to 100%, but the child (ul
) is too large and causing overflow (getting cut off in my scenario).
Is there a way to stretch the fieldset
child to 100% without causing overflow?
fieldset {
height: 300px;
overflow: hidden;
}
ul {
display: flex;
flex-direction: column;
height: 100%;
justify-content: space-around;
background-color: #ffffbb;
}
<fieldset>
<legend>How to stretch child</legend>
<ul>
<li>item 1</li>
<li>item 2</li>
<li>item 3</li>
<li>item 4</li>
<li>item 5</li>
<li>item 6</li>
<li>item 7</li>
<li>item 8</li>
</ul>
</fieldset>
In case you need it, here's also an external fiddle link: Example in Fiddle.
Edited:
Specifying a specific pixel height is essential. I receive form layouts from a C# Windows application via WebSocket. Each component is positioned absolutely with identical properties as in the C# application - that is, left, top, width, and height.