I have this html and CSS:
<div style="background-color:Red; width:200px; height:200px;">
<div style="background-color:Blue; width:50px; height:50px; float:right;">aa</div>
<div style="background-color:Green; width:50px; height:50px;">aa</div>
I thought it would place the blue box after the green one (flow layout) but its moved it right over to the edge of the red container, which is really wierd..Any ideas why it doesnt flow?
‘float’ means ‘move to that side and allow anything following to appear on the opposite side’
Since you are floating blue right, it appears on the far right hand side of its container.
Since there is room next to Blue and Blue is floating, Green appears next to Blue. Green appears at the left hand side because it has nothing to alter its horizontal position from the default (such as margins, or touching Green).