Some questions about margin collapsing in IE8

  
How to solve the problem of margin collapsing, there is not much discussion here, and there are many related solutions online. The previous IE8 just came to market, so I decided to use IE8 to see if the page I made myself was strong enough. It was found that the solution of margin collapsing failed to work in IE8. Previous solution:
.clear { clear: both; font-size: 0px; line-height: 0px; } The solution didn't work, so I used IE DEVELOPE TOOLBAR to debug and found that it exists. What is the reason? I haven't been able to find related problems on the Internet, I can only solve them myself (hey, I want to stand on the giant->Google's shoulders can always see farther). No need to talk, the following solutions found: 
.clear { clear: both; font-size: 1px; height: 1px; line-height: 1px; } Maybe IE8 in the parsing of the page, the height The element of 0 is not considered as the object of consideration (personal understanding, not authoritative), and there is one point that has to be reminded here, that is, its shortcoming: the page will generate extra 1px high blank (but I think This should not have any big impact in reality). 

Copyright © Windows knowledge All Rights Reserved