ie bugs:height treated as min-height??

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

ie bugs:height treated as min-height??

Post by newmember »

try to run this piece of html in IE and compare it to firefox...
I don't understand why IE ignores height:1px on #second div?

Code: Select all

<html>
<head>
<style type="text/css">
#body&#123;width:100%&#125;

#first&#123;
height:100px;
border-style:solid;border-width:1px;border-color:#000;background-color:#f00;
&#125;

#second&#123;
height:1px; /* <-------why IE ignores this??? */
background-color:#fff;
&#125;

</style>
</head>
<body>
<div id="first"><div id="second"></div></div>	
<body>
</html>
thank you
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

add

Code: Select all

font-family: Arial, Helvetica, sans-serif;
	font-size: 1px;
to #second
User avatar
newmember
Forum Contributor
Posts: 252
Joined: Fri Apr 02, 2004 12:36 pm

Post by newmember »

ok thanks
i tried earlier
overflow:hidden and it also helps...

i wanted to know if it is some known IE bug?
Draco_03
Forum Regular
Posts: 577
Joined: Fri Aug 15, 2003 12:25 pm
Location: Montreal, Canada

Post by Draco_03 »

font size in IE is automatic at 8 I think. or something so when you force font size it's fix
Post Reply