W3C home > Mailing lists > Public > www-style@w3.org > May 2004

Re: 'offsetWidth/height' function

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 8 May 2004 12:52:56 +0000 (UTC)
To: "Sean M. Hall" <pianoman@reno.com>
Cc: www-style@w3.org
Message-ID: <Pine.LNX.4.58.0405081250400.9965@dhalsim.dreamhost.com>

On Fri, 7 May 2004, Sean M. Hall wrote:
>
> A common problem with CSS is two column stretching. The navbar should be
> as long (no more, no less) than the content div. CSS does not yet have a
> rule for this (see http://www.quirksmode.org/dom/3column.html)
>
> I propose this for CSS(3):
>
> div#navbar {
>    height: offsetHeight(div#content)px;
>    width: 25%;
> }

This is possible now in CSS2.1:

   div#navbar { display: table-cell; }
   div#content { display: table-cell; }

(Assuming the two elements are adjacent siblings.)

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
U+1047E                                         /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 8 May 2004 08:53:03 GMT

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