I have 2 divs side by side where the red one take up the remaining space
but it overflows when the inside elements are too long like this:
#wrapper{
width:50%;
display:flex;
height:10rem;
background-color:yellow;
}
#wrapper div{
height:5rem;
}
.second {
flex: 1;
}
<div id="wrapper">
<div style="background: blue">short version</div>
<div class="second" style="background:red;">looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooog version</div>
</div>
I tried overflow-wrap: anywhere;
but there are browser compatibility issues plus how do I get it to ellipsis if overflowing at the bottom?