Question: Why can’t I see the effect when I set the height of the div to 1px? The div is always so high.
Answer: Add an attribute to your div: font-size:0;
illustrate:
This problem occurs in IE6;
The div in IE6 has a minimum font height by default. The minimum height of the div is this height unless you change the font size.
Add it like this: .style1{height:1px;font-size:0;}
For example, if you want to use a div to make a 1px high red line
What you will get when you don't set the font size:
What will happen if font-size:0 is set: