With regard to the interface that uses floats to achieve left and right layout, use clear:both to clear the problem of height anomalies caused by floats.

The left and right layout of

interface is often seen in daily development. It was normal to use positioning before. Recently, floating was used to achieve left and right layout. When using clear:both to clear floats, a strange problem was found. The problem is described as follows:

clipboard.png

clear:both:

clipboard.png

it is abnormal to use clear:both to clear floating elements, which is as high as body content. If you set overflow:hidden to the parent, it will not cause this problem. Ask the bosses of css how to solve this problem

.
Css
Mar.14,2021
Menu