Home >Web Front-end >CSS Tutorial >CSS Tips: Solutions to Occupying Space When DIV Is Empty_Experience Exchange
At this time, what is affecting the final display in IE, and how is it parsed?
Possible influencing factors: font-size, line-height, height, overflow
Let’s add the above code one by one Filtering attributes (Friends who are interested in the specific process can experiment in private, "Do it yourself, have enough food and clothing"!)
During the test, you will find that the parsing of IE6 and IE7 are also different. For example, after setting the style of line-height:0; height:0; for the div, the display in IE7 is normal and no longer occupies the physical space, but IE6 still goes its own way, or it is sad!
For the final test result, the simplest way is to set the height and overflow attributes for the div:
This article comes from the WEB Development Network Original link: http:// www.cncms.com.cn/css/9642.htm