W3C home > Mailing lists > Public > www-style@w3.org > August 2002

height as percentage and inheritance

From: REFSTRUP,JACOB (HP-Vancouver,ex1) <jacob_refstrup@hp.com>
Date: Fri, 2 Aug 2002 20:19:16 -0400
Message-ID: <6D805D4C4567D411AF32009027B6835109810069@xvan02.vcd.hp.com>
To: "www-style (E-mail)" <www-style@w3.org>

In the following example a p has a height of 4in;
the div inside that has height: 50% and the div
inside that has a height: inherit. In reading the
spec I assume that the inner div should inherit
the computed value (not percentage). This is the
behaviour Mozilla uses. But IE6.0 (Win32) and Opera6.0
seem to ignore height: inherit and use height: auto
instead.

Comments?
- Jacob

<html>
<head>
<style type="text/css">
div { overflow: hidden; border: solid thin black; padding: 0.5em }
div.one { height: 50% }
div.two { height: inherit}
</style>
</head>
<body>
<p style="font-style: italic">
Below is a <b>&lt;p&gt;</b> with a height of 4in. Inside it has
a <b>&lt;div&gt;</b> with height 50%; inside is another <b>&lt;div&gt;</b>
with height set to inherit.
</p>
<div class="one">
a
<div class="two">
b
</div>
</div>
</body>
</html>
Received on Friday, 2 August 2002 20:19:19 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:15 GMT