1, in non-IE browser (such as Firefox), when the height of the container is auto, and the contents of the container has floating (float is left or right) elements,
In this case, the height of the container cannot be automatically stretched to fit the height of the content, causing the content to overflow outside the container and affect (or even destroy) the cloth
The phenomenon of the Bureau. This phenomenon is called floating overflow, in order to prevent the occurrence of this phenomenon and to clear the float.
2, the method of clearing floating:
(1) Use Clear:both. If we know the elements immediately following the floating element, you can use this method to clear the float. Such parties
The method is simple, easy to use, does not need hack, the semantics is also good.
(2) Empty div method. This method is generally not recommended, although there are no side effects, but because this div is purely for performance, no semantics.
(3) Customizing a CF class, adding a CF class to a container can clear floating
.Cf:Before, .:after { Content:< Span class= "PLN" > "; Display: Block; Clear: both< Span class= "pun" >; Height: 0;: Hidden; visibility : Hidden; /span>
CSS clear floating, clear floating several ways