In IE 6, how does one set the div height? in IE6, how does one set the div height?
In IE 6, how do I set the div height:
Suggestion: writing code as much as possible can effectively improve learning efficiency and depth.
In IE6, we may not be able to set the height of a div as we like, because in IE6, the height of a div seems to be associated with the font size, if you do not set the font size, you cannot set the height of the div to a size smaller than 12 PX. For example:
<! DOCTYPE html>
The above code is normal in a standard browser, but in IE6, The div height cannot be set to 5px, and the height is still 12px. The solution is to set the div font size to 0 PX, and then you can set a smaller height, but the minimum height can only be set to 2 PX.
<! DOCTYPE html>
If you want the div height to be set at will under IE6, you need to add overflow: hidden. For example:
<! DOCTYPE html>
The above code can set the height of the div as you like.
Original address: http://www.51texiao.cn/div_cssjiaocheng/2015/0429/415.html