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

- Jacob

<style type="text/css">
div { overflow: hidden; border: solid thin black; padding: 0.5em }
div.one { height: 50% }
div.two { height: inherit}
<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.
<div class="one">
<div class="two">
Received on Friday, 2 August 2002 20:19:19 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:03 UTC