I'm wondering how to make two child divs share a parent div.
I want the left column to contain text from a database (one word). This could be 1-10 letters long. Since I want the left columns width to fit the word perfectly, I don't give it a set width.
Then, I was trying to have the right column fill the remaining space.
Is there an easy way to do this?
I'm not sure what to set the right column's css to make this happen.
<div id="parent_div" style="width: 100px; height: 100px;">
<div style="background-color:blue; float:left;" id="left_column">
blue
</div>
<div style="background-color:red; float: left;" id="right_column">
red
</div>
</div>
I read you shouldn't have something floated without giving it a set width, but then it seems like what I want would be impossible.
Thanks