First, you must know two things:
1. Browser events display objects in a flow layout in accordance with the order in which the objects are declared in the HTML code.
2. Almost all objects in HTML are divided into two types by default: The Block object and the In-line object. where the block default display state is to occupy the entire row; The In-line object, in contrast, allows other objects to be displayed in a row.
Now look at the float property, which is to change the default display of the Block object. Once the Block object has a float property set, it will no longer occupy one row on its own.
Answer add
If there is a Div property is Float:left, it followed by a Div, this div will automatically follow the previous div behind, and then float, if you do not want the following div to float, you need to close the previous Div, with Clear:both. This will not interfere with the following Div. (www.3lian.com)
Answer add
If you add float to your code, the div block that you add later will also follow the float you defined earlier, and if you don't want it to follow the float behind it, close it!