When you float an element to left, it is taken out of the flow, the next element is laid out as if the first one did not exist. Then the floated element is placed. the textual content is given a special treatment such that the text starts flowing around the floated element.
In the above example, the first div was taken out of flow and the second div was placed ( still has the block context and starts from extreme left ) as if no other element existed. Then the floated div is placed. Since both has same size, there is an overlap. Then the text float mechanism kicks in and try to place the text around the floated div. The text container ( box1 ) does not have any space after the floated div ( both are overlapping ) it is naturally pushed down.
one way to see it aligned to the box is to increase the second box width, so that the text gets contained.
Other option is to add margin-left to the second div so that the second div starts at an offset from the floated div and there is space for the content to align it self around the first div. See the example fiddle
.box1 {
width: 100px;
height: 100px;
background-color: red;
margin-left: 100px;
}
http://jsfiddle.net/sreekarun/xR9Rd/8/