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:

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

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 
this
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.
http://terrainformatica.com

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

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