tags:

views:

220

answers:

4

i'm using a empty div to display a line by setting height 3px. it works fine in all browsers but in ie6 the height div displayed with 20px height. It remains same even for height:0px . But changes in other properties reflects but not height and there is no duplicate css entry and inherited value from other div. Can any one help please

<div id="line"></div>

CSS:

#line {border: none; background-color: #134c7c; height: 3px; margin-bottom: 20px;}

+2  A: 

Try:

line-height:0
Roberto Aloi
+1  A: 

Just a wild guess.

Inspect whether there is any space inside the element. If yes then set the

font-size: 1px;

property of the element.

rahul
thank you it works fine.
Paniyar
+2  A: 

Internet Explorer has the odd idea that the content of every element should be at least one character high. You can get around this by using the overflow attribute, that way the content can remain a character high, but it doesn't affect the height of the element itself:

.line { height: 3px; overflow: hidden; }
Guffa
A: 

try with space in the div or   Just guess

IPhoneCrazy