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

Re: Mixing percentage height and min-height

From: Allan Sandfeld Jensen <kde@carewolf.com>
Date: Fri, 13 Oct 2006 18:17:20 +0200
To: www-style@w3.org
Message-Id: <200610131817.20663.kde@carewolf.com>

On Friday 13 October 2006 16:06, 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...
>
I think one of the of the most logical effects on .child should be: { height: 
10px; min-height: 50px }
In other words that height percentages of min-height defines min-height. 

The problem with that we can end up with two min-heights, but it can be dealt 
with. Either by letting it only happen when explicit min-height is default or 
let it combine with explicit min-height (largest wins).

`Allan
Received on Friday, 13 October 2006 16:17:49 GMT

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