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

Re: Mixing percentage height and min-height

From: L. David Baron <dbaron@dbaron.org>
Date: Fri, 13 Oct 2006 08:26:35 -0700
To: www-style@w3.org
Message-ID: <20061013152635.GA32419@ridley.dbaron.org>
On Friday 2006-10-13 09:06 -0500, Boris Zbarsky wrote:
> What if I have:
> 
>  .parent { height: 20px; min-height: 100px; }
>  .child { height: 50% }
> 
> and the same markup?  Should the child end up 10px tall?  Or 50px tall?  Or 
> 0px tall?  Note that in this case the parent's height in fact does not 
> depend on the children, so I would think that it should be either 10px or 
>  50px.  But I'm not sure which one of those it should be...

It might be reasonable to make it 50px.  In particular, what the
spec could say is that the basis for percentage heights is 'auto' if
'height' is 'auto', and is otherwise the computed value of 'height'
clamped within the ['min-height','max-height'] range.

-David

-- 
L. David Baron                                <URL: http://dbaron.org/ >
           Technical Lead, Layout & CSS, Mozilla Corporation

Received on Friday, 13 October 2006 15:26:50 GMT

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