Is there a way to handle the overflow of a div when it exceeds its container's size without specifying the height?
Requirements:
.Wrap
must adjust in height and should not have a fixedheight
..Head
needs to have a fixed height..Body
should become scrollable if its height surpasses that of its container (.Wrap
)
The goal is to make .Body
expand to fit .Wrap
, triggering an overflow when necessary.
CURRENT CSS
.Wrap{
position:fixed;
top:10%;
left:10%;
display:flex wrap;
align-items:stretch;
max-height:50%;
max-width:50%;
overflow:hidden;
}
.Head{
height:50px;
width:100%;
}
.Body{
overflow:auto;
}