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

Re: positioning and sizing an element relatively to any other element

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Fri, 19 Mar 2010 16:12:20 -0700
Message-ID: <dd0fbad1003191612o63740feg5c827417cecb7f88@mail.gmail.com>
To: Aryeh Gregor <Simetrical+w3c@gmail.com>
Cc: Daniel Glazman <daniel.glazman@disruptive-innovations.com>, "www-style@w3.org" <www-style@w3.org>
On Fri, Mar 19, 2010 at 1:21 PM, Aryeh Gregor <Simetrical+w3c@gmail.com> wrote:
> On Wed, Mar 17, 2010 at 10:35 AM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> 3) Since we're talking about height, it would also be awesome to have
>> a way to say "this should be the height of its container but no
>> larger". You'd think height: 100% would do that, but no, that seems to
>> make the box the height of its content, at least the last time I tried
>> it (yesterday). That's OK, though, we love you even though you're
>> eccentric, CSS. I think we just need a little something different,
>> here.
>
> Usually, the container's height is determined by its contents' height.
>  If the container has a fixed height, then its contents will always be
> fit into that height, as controlled by the overflow property.  What
> exactly would this change add?  What's an example syntax and an
> example of a case where it would do something that's not already
> pretty simple?

Example: an element with significant text content and a floating
child, where you want the child to stretch the whole height of the
element.  The height is determined by the text content, as there is
more of it than what is in the floated box.  You can't do this right
now.

Another example: several elements using Table Layout to link their
heights together.  You want some children of the elements to stretch
to the full height of the display:table-cell containers.

~TJ
Received on Friday, 19 March 2010 23:13:09 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:25 GMT