I need to make three columns, one of them needs to be fixed width, one needs to be fluid to fill up empty space, and one needs to be fluid, but to have the combined fixed width of its children (they don't have to be inline, I just wrote the code to make my question more clear).
The div that the three columns will sit in, has a variable width, and all the empty extra space has to go to just the one column with an input inside it (that also has to stretch to fill that columns width, but once the column works, that won't be a problem).
Here's my code, the right column has to keep the width of it's three containing boxes:
.container {
width: 100%;
display: table;
vertical-align: top;
}
.col_left {
width: 100px;
display: table-cell;
background: #708A91;
}
.col_mid {
display: table-cell;
}
.col_mid input {
width: 100%;
}
.col_right {
display: table-cell;
background: #708A91;
}
.col_right .element_with_variable_width {
padding: 10px
}
.inline_box {
display: inline-block;
vertical-align: top;
height:19px;
width: 30px;
margin: 0 5px;
background-color: #E066FF;
}
<div class="container">
<div class="col_left"></div>
<div class="col_mid">
<input type="text">
</div>
<div class="col_right">
<span class="element_with_variable_width">
<span class="inline_box"></span>
<span class="inline_box"></span>
<span class="inline_box"></span>
</span>
</div>
</div>
Any ideas? Can this be done with CSS alone?