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

Re: Mixing percentage height and min-height

From: Alastair Campbell <ac@alastc.com>
Date: Fri, 13 Oct 2006 16:05:39 +0100
Message-ID: <452FAB43.7040907@alastc.com>
To: Boris Zbarsky <bzbarsky@mit.edu>
CC: www-style@w3.org

Boris Zbarsky wrote:
>  .parent { height: 20px; min-height: 100px; }
>  .child { height: 50% }
> and the same markup?  Should the child end up 10px tall?  Or 50px tall? 

I've missed most of this thread, which I think will be an advantage 
here, I'm looking at it from a front-end developer point of view.

My thought process would be: "The parent will be 100px tall, therefore 
the child must be 50px tall".

I would assume that the browser calculates the height of the parent and 
then makes the child 50% of that.

Does that help?

Kind regards,

Received on Friday, 13 October 2006 15:06:05 UTC

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