I'm trying to organize an horizontal layout with divs of widths 40% - 30% - 30% in a container using float.
Inside each div I want to insert plain text followed by an input field that fills the horizontal rest of its div.
As a simplified reproduction of the problem, just have this on CSS:
.r {background-color: pink;}
.g {background-color: lightgreen;}
.b {background-color: lightblue;}
.w40 {width: 40%;}
.w30 {width: 30%;}
.w100 {width: 100%;}
.fl {float: left;}
.fr {float: right;}
.cb {clear: both;}
And this on HTML:
<div class="r w40 fl">
<div class="g fl">Aaaaaa:</div>
<input class="b" value="Bbbbbb" />
</div>
<div class="r w30 fl">
<div class="g fl">Cccccc:</div>
<div class="b">Dddddd</div>
</div>
<div class="r w30 fl">
<div class="g fl">Eeeeee:</div>
<div class="b">Ffffff</div>
</div>
How can I make Bbbbbb occupy all the space at the right side of its div, just like Dddddd and Ffffff?
This is what I'm expecting: