Get the App
SLTechnology News&Howtos  ›  Development  › 

How to realize that margin-top doesn't work after clear:both. Other left and right sides work.

Shulou Source: shulou.com Published: 2022-06-03 08:10:29 10月01日 Update

This article mainly introduces "how to realize that margin-top does not work after clear:both. In daily operation, I believe that many people have doubts about how to realize that margin-top does not work after clear:both. The editor consulted all kinds of materials and sorted out simple and useful operation methods. I hope it will be helpful for you to answer the doubt that "how to realize that margin-top doesn't work after clear:both and all the other things work around"! Next, please follow the editor to study!

The code is as follows:

Float:left

Clear:both

2222222222222222222

The margin of the previous DIV floating div works

After the latter DIVclear:both, only margin-top does not work, and other left and right sides work.

At this point, the study on "how to achieve that margin-top does not work after clear:both and other things work around" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Tags: Role learning more help practical next code only articles methods theories knowledge articles websites materials follow questions easy to use practice floating Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS Linux Shulou Information Redmi Huawei