I can't seem to find how to create this simple alignment:
Have a line with 2 side by side divs, the first taking up the space it requires and the latter the remaining space (this one is simple enough with inline-block or float)
The right div should contain two overlayed child divs each taking 100% of the right parent (this I couldn't do).
My motivation is a progress bar with a label (on the left) and a percent label over the progress bar. The progress label text should be centered (this is why I need it to take 100% of the right parent)
If anyone has any idea, I'd love to hear them.
Here is an illustration of my problem:
<div id="all">
<div id="left">
left
</div>
<div id="right">
right
</div>
</div>
#all {
width: 200px;
height: 100px;
background: grey;
border: 1px solid;
}
#left {
background: red;
float: left;
height: 100%
}
#right {
background: blue;
display: block;
height: 100%;
}
Here is a jsFiddle illustration of it: http://jsfiddle.net/a9cnH/3/
My problem: I want to position 2 divs inside the "right" div. Each should take 100% of the right div. If I use absolute on them than I must make my "right" div position other than "static", but this make it not align next to the left div side by side.