Page 1 of 1

IE6 why?

Posted: Thu Nov 08, 2007 1:02 am
by JellyFish
Hey, why is it that when when I write:

Code: Select all

<div style="height: 10px; background: red;">
<div style="height: 10px; background: blue; float: right; width: 10px;"></div>
</div>
in IE6 and lower, not IE7, nor firefox, etc, I get fifteen pixels height in both divs?

Copy and paste the code into this and you'd see what I mean.

I thought that maybe if I know why this is happening then I could fix come up with a solution.

Thanks for reading, guys. I'd so much appreciate a simple answer.

Posted: Fri Nov 09, 2007 3:52 pm
by JAB Creations
Try line-height and font-size if height, max-height, and min-height aren't working as desired. Remember, your bottom and top border, margin, and padding also contribute to height. If that doesn't work you can always override it with conditional comments!