W3C home > Mailing lists > Public > www-style@w3.org > August 2003

Suggestions about max-width

From: Silas S. Brown <ssb22@cam.ac.uk>
Date: Tue, 12 Aug 2003 17:43:21 +0100
Message-ID: <16185.6441.939661.961536@ssb22.joh.cam.ac.uk>
To: www-style@w3.org

Hi,

I have some suggestions about the max-width property in CSS2
which I hope can be improved for CSS3 for accessibility
purposes.  This needs some explanation.

I have low vision and I'm using a user-supplied stylesheet
to attempt to override authors' formatting, see
http://www.cus.cam.ac.uk/~ssb22/source/lv-css.html

When working in large print, it is necessary to limit the
width of the text that is displayed.  Normally a browser
will limit it to the width of the viewport, but a problem
can arise when there is a block element that contains lots
of text (usually it's a TD element in a layout table - yes I
know people shouldn't be using layout tables, but they still
do and we need to think about transitional things).  The
problem is that a single long word within the text will
increase the width of the whole block element, and every
part of the text within that block will flow to the
increased width, even if this is way too wide for the
viewport.  Incessant scrolling left/right is NOT fun.

See for example this page:
http://www.sarc.com/avcenter/venc/data/w32.blaster.worm.html
and view it in a 48-point font.  The two lines containing
Windows registry keys increase the width of the TD so that
the entire page is at least 50% wider than the viewport, and
lots of left/right scrolling is needed.

If the browser supports CSS2 properly (better than IE6) then
setting the "max-width" property for all elements will help.
However, it is still not a perfect solution because

1.  There is no way to set max-width of an element relative
    to the width of the viewport.  You can only set it
    absolutely, or relative to the containing element.
    Since the containing element can be too wide, you're
    left with absolute settings.  This is OK but it would be
    nice to set it to the width of the viewport.

2.  There is absolutely no way to set max-width of anonymous
    block elements.  It is not inherited, and there is no
    selector that will select anonymous elements that are no
    part of the document tree (even the universal selector
    misses them).  So any anonymous block elements can be
    too wide.  Such elements include paragraphs of text that
    are separated by <BR><BR> instead of <P> (transitional
    again).

Would it be reasonable to request that this be addressed in
the next release of CSS?

Thanks,        Silas

-- 
Silas S Brown, St John's College Cambridge UK http://www.cus.cam.ac.uk/~ssb22

"He couldn't just say 'I've made a mistake'; he'd say 'I'll add something
else, and then it won't BE a mistake.'" - Rupert Gould in "Longitude"
Received on Tuesday, 12 August 2003 12:43:23 GMT

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