W3C home > Mailing lists > Public > www-style@w3.org > April 2008

Re: box model comments

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Sun, 06 Apr 2008 20:03:23 +0200
To: arghman <jmsachs@gmail.com>
Cc: www-style@w3.org
Message-ID: <8q3iv35punf55ah9tronuqmkcm18ojrin0@hive.bjoern.hoehrmann.de>

* arghman wrote:
>[...]

Some pointers, see http://www.w3.org/Style/CSS/current-work for more.

>for example: "width: 50% plus 20px minus 10px;" would mean ideally 50% of
>screen width, but if that's not possible then up to 20 pixels more or 10
>pixels less.

http://www.w3.org/TR/css3-values/#calc

>TeX also has "fil" and "fill" (and "filll"?) to denote infinitely
>stretchable glue that divides space proportionally. Suppose you had a table
>with a width of 300 pixels. You could define the width of column 1 to be
>30px plus 10px, column 2 to be 40px plus 4fil, and column 3 to be 50 px plus
>5fil. The specified widths total 120px; this leaves 180px remaining, which
>is divided up between the "plus" amounts. The fixed amount (30px) of column
>1 loses its share to the other two columns which have "infinite" amounts
>("fil"); column 2 gets a weighted share of 4 and column 3 gets a weighted
>share of 5. So column 1 has a width of 30px, column 2 has a width of 40px +
>4/9 * 180px = 120px, and column 3 has a width of 50px + 5/9*180px = 150px.

http://www.w3.org/TR/css3-layout

>I have found it very frustrating in CSS2 to specify sizes & positions of
>divs and spans where the size/position is indirectly dependent on something,
>e.g. I'd like a div element to be at least as wide as the text it contains,
>up to a maximum of 100px (after which the text column will wrap).

http://www.w3.org/TR/CSS21/visudet.html#propdef-max-width

It would be great if you could have a look at the links and let us know
what you think.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Sunday, 6 April 2008 18:03:59 GMT

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