(1) For a layer with a floating layer, the main layer should use overflower: hidden to eliminate other external effects caused by the floating layer.
For example:
<Div id = "main1">
<Div id = "son1" style = "float: Left; display: inline"> AA </div>
</Div>
<Div id = "main2" style = "margin-top: 10px;">
Main2 content
</Div>
At this time, if mian1 does not include overflower: hidden, the margin-top of main2 has no effect because of the influence of the floating element son1.
Display: inline is used to ensure compatibility with the floating margin of IE6. Of course, there are other ways to eliminate the influence of float, that is, add a div behind the floating element to make it clear: Left, right, both
(2) For floating Li, to arrange multiple rows and multiple columns, Li should refer to the write height and width. The height is specified because if no height is specified, the Li in the first row will sink if the number of lines in the text is different.