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

Re: [css21] height: [percent]

From: Ignacio Javier <ijavier@efenet.com>
Date: Fri, 3 Mar 2006 11:00:04 +0100
Message-ID: <001c01c63ea9$3f19d310$2301a8c0@dominio.local>
To: <www-style@w3.org>


----- Original Message ----- 
From: "Andrew Fedoniouk" <news@terrainformatica.com>
To: <www-style@w3.org>
Sent: Friday, March 03, 2006 8:58 AM
Subject: [css21] height: [percent]


>
> 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?

As I see is not clear in wich case we are. I hope some other helps:

Read:
http://www.w3.org/TR/CSS21/visudet.html#inline-replaced-height

The confuse point is when the spec says that the computed value is auto, as 
you say.

> [1] http://www.w3.org/TR/CSS21/visudet.html#the-height-property
Received on Friday, 3 March 2006 10:02:44 GMT

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