IE6 why?

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
JellyFish
DevNet Resident
Posts: 1361
Joined: Tue Feb 14, 2006 7:18 pm
Location: San Diego, CA

IE6 why?

Post 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.
User avatar
JAB Creations
DevNet Resident
Posts: 2341
Joined: Thu Jan 13, 2005 6:44 pm
Location: Sarasota Florida
Contact:

Post 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!
Post Reply