W3C home > Mailing lists > Public > www-style@w3.org > March 2006

[css21] height: [percent]

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Thu, 02 Mar 2006 23:58:55 -0800
To: www-style@w3.org
Message-id: <013d01c63e98$520e2e50$3201a8c0@TERRA>

Question regarding computation of height attribute given in percent units.

Consider following html:

<p><img style="height:50%;"src="..." /></p>

I didn't find any UA which follows rule [1]:

"The percentage is calculated with respect to the height
of the generated box's containing block. If the height of the containing
block is not specified explicitly (i.e., it depends on content height), and 
element is not absolutely positioned, the value computes to 'auto'"

All known me UAs set height of the image equal to 50% of height
of the body element but as far as I understand wording above
it should be set to 'auto' here.

Question: what height this image should have?

Thanks in advance.

Andrew Fedoniouk.

[1] http://www.w3.org/TR/CSS21/visudet.html#the-height-property
Received on Friday, 3 March 2006 07:58:59 UTC

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