In IE6, when CSS is used to define the height of a DIV, this problem often occurs when the minimum height of the DIV is smaller than a certain value, no matter how you set the minimum height, the height of the Div will be fixed at a value and will not change. This problem is very annoying. This is because in IE6, the system does not default that Div has a default height, but you have not solved a hidden parameter, font-size, in ie6, the font-size in the Div attribute is closely related to the font-size defined in your system css. Therefore, you must define the font-size of this Div separately, in this way, the problem can be solved.
This problem occurs in IE6. The div in IE6 has the smallest font height by default, and the smallest div height is the height, unless you change the font size. Add:
. Style1 {height: 1px; font-size: 0 ;}
For example, you want to use a div to create a red line with a height of 1 px.
When the font size is not set, the height is not as expected.
Reference content is as follows: </Style> <Div class = "style1"> </div> <Style type = "text/css"> . Style1 { Height: 1px; Background: red; } </Style> <Div class = "style1"> </div> |
If font-size: 0 is set, the result is that the row height is changed to the specified 1px. The Code is as follows:
Reference content is as follows: <Style type = "text/css"> . Style1 { Font-size: 0; Height: 1px; Background: red; } </Style> <Div class = "style1"> </div> |