W3C home > Mailing lists > Public > www-html@w3.org > November 1999

Suggestion for adding MINWIDTH and MAXWIDTH attributes to HTML an d CSS spec

From: Piers Williams <PiersW@zinc.co.uk>
Date: Wed, 10 Nov 1999 17:49:13 -0000
Message-ID: <0770EFD2075AD211B66C00A0C9E4E24B4EE955@ZINCEMAIL>
To: "'www-html@w3.org'" <www-html@w3.org>
At the moment the HTML spec provides for developers to specify either a
fixed, or variable width for certain block elements (Tables, DIV's etc...).
However this model has serious limitations, which are a cause of constant
irritation to myself and the designers I work with.
If a table, for example, is set width="100%", then it is up to the
user-agent to scale the table according to the agent's window. This is good,
because it enables the content to maximise use of the available space on the
user's monitor, whatever the screen size and resolution. However - given a
particularly wide monitor - lines of text can be drawn out to a width that
makes them less legible (not to mention ugly).
Given this problem, many web designers opt for the fixed-width table model,
where an absolute pixel width is supplied for the table. This prevents lines
of text becoming too long (horizontally), but in a highly inflexible way. To
avoid the trauma of horizontal scrollbars, it is usually necessary to fix
the width of the table at 620px, which means on a large monitor over half of
the screen can remain unused.
What is needed is a way of specifying the width of these elements in such a
way that the user-agent is free to resize them up to a point - i.e. provide
a mechanism for resizing with constraints.
My suggestion would be to implement the attributes MINWIDTH and MAXWIDTH for
the TABLE tag (and indeed any other tag with a WIDTH attribute). The
attributes would take the same values as width (length, percentage, auto,
inherit), and would specify an lower and upper bound to the user-agent's
freedom to resize that content.
The user-agent would only apply these attributes if both were specified, and
if so ignore the corresponding WIDTH tag. Backwards compatibility could be
preserved by specifying a WIDTH tag as a fall-back to earlier browsers.
I would suggest that the MINWIDTH and MAXWIDTH attributes wouldn't have to
have the same value type (pixel vs. percentage etc...), but that would be up
to the user-agent to ensure that the MINWIDTH and MAXWIDTH values didn't
overlap. What would happen if overlapping MINWIDTH / MAXWIDTH values were
supplied (either directly, or indirectly via resolution of percentage-widths
into pixel-widths) is - I think - a topic for further discussion. My present
thoughts would be that the user-agent would reject invalid MINWIDTH /
MAXWIDTH pairs, and fall back on the WIDTH tag (if present).
I would also suggest that MINWIDTH and MAXWIDTH attributes be added to the
CSS spec in the appropriate places.
(PS: Apologies if this has already been suggested - I can't find it
http://www.zinc.co.uk <http://www.zinc.co.uk/> 
Received on Wednesday, 10 November 1999 13:01:50 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:05:51 UTC