When I made the DIV height control today, I found that it was invalid when the height of the DIV controlled by IE was very small. I checked related articles specially.
Finally, the solution is available. refer to the following article:
If you want to create a line with a height less than 12 PX (approximately), it will be displayed in IE higher than the actual height.
<Style>
. Line {
Background: # cccccc;
Height: 6px;
} </Style>
<Div class = "line"> </div>
It can be seen that the actual height is greater than 6px, which is also a bug in IE. The following three methods can solve this problem. The first method is recommended.
1:
<Style>
. Line11 {
Background: # cccccc;
Height: 6px;
Overflow: hidden;
} </Style>
<Div class = "line11"> </div>
2. Add a space between the Div. Note: ie5.0 is invalid.
<Style>
. Line12 {
Background: #336699;
Line-Height: 6px;
} </Style>
<Div class = "line12"> </div>
3:
<Style>
. Line13 {
Background: # cc0000;
Height: 6px;
Font-size: 1px;
} </Style>
<Div class = "line13"> </div>
Note: There is no problem at all in Firefox. It is an IE bug.
Overflow: hidden;
Font-size: 1px;