According to this excerpt from BrainJar.com's positioning article
For one, the box being floated should have a width defined for it, either explicitly or implicitly. Otherwise, it will fill its containing block horizontally, just like non-floated content, leaving no room for other content to flow around it.
However in the following code, this does not happen i.e. the floated div does not expand to it's parent containers full width and there are no width defined on floated div.
HTML
<div id="container">
<div id="aqua">aqua</div>
<div id="yellow">yellow</div>
<div id="pink">pink</div>
</div>
CSS
#container { border:1px solid red}
#aqua, #yellow { border:1px solid green; float:left;}
#pink { width:150px; border:1px solid blue; }
I am interested in knowing the reason behind it.
Thanks