I need the 3rd out of 4 children of a div to take up the remaining space. Here is some sample code im working with https://jsfiddle.net/68s5q34v/
<div class="container">
<div class="menu">
<div class="one">
one
</div>
<div class="two">
two
</div>
<div class="remaining">
remaining
</div>
<div class="three">
three
</div>
</div>
</div>
.container{
width:100%;
background-color:tomato;
padding:4px 0;
}
.menu{
background-color:orange;
width:300px
}
.one,.two,.three{
background-color:dodgerblue;
}
.remaining{
background-color:green;
}
.menu,.one,.two,.three,.remaining{
padding:5px;
}
div{
display:inline-block;
border:1px solid black;
}
the width of [one][two][remaining][three] are unknown.
[one],[two],[three] should only take up as much space as they need for their inner text.
[remaining] should take up what remains, pushing [three] to the end, essentially not showing any orange.
note: There are similar questions, but! i cant find one that matches my question with the detail that my child elements does not have a set width.