1: Add floating */* floating element to parent class too much has limitations */
2: Add display:inline-block/* to the parent class * will also apply the element's direct space gap.
3: Add an empty element after the floating element, and set the clear floating clear:both;
4: After floating element <br clear: "All" >/* does not meet the standards */
5: Floating element's parent class Add/* recommend this method */
. Box-set:before,
. box-set:after {
Content: "";
display:table;
}
. box-set:after {
Clear:both;
}
. box-set {
*zoom:1;
/* Compatible with ie6*/
}
6: Parent class Add overflow
/* IE6 Invalid must be added zoom:1 */
/* IE6 floating element If the parent class has a width, you don't have to clear the float */
This article from "Misty Rain Life" blog, please be sure to keep this source http://1095221645.blog.51cto.com/6507311/1889975
Several ways to clear floating