I have the following li item:
a
Looked for the same solution, but found only this which worked great for me:
<li>
<span style='display: table-cell; background-color:red'>a</span>
<span style='display: table-cell; width: 100%; background-color:green'>b</span>
</li>
All you need is just using table-cell displaying and set filler span width to 100%. All other solutions I've tried didn't work for me as expected.
Don't float the second one, and make it display:block
.
http://jsfiddle.net/ymAt5/
You don't want to float each of them left, only the first one, and then make the second one display in block mode:
<li>
<span style='float:left; background-color:red'>a</span>
<span style="display: block; background-color:green;">b</span>
</li>