[Zope] Text won't Wrap on Zope site

Martijn Pieters mj@antraciet.nl
Thu, 15 Jul 1999 12:34:01 +0200


At 07:54 15/07/99 , Cees de Groot wrote:
>It seems that Microsoft started this craze for broad pages by making IE so
>that it comes up in a "landscape" window (at least, that's what I remember
>from the one time I ran the thing - no worries, I had my computer inside a
>five-pointed star and a circle of lit candles ;-)).
>
>This is nice for web brochures, which, like real paper brochures, are void of
>information in any format. However, at least the coming few decades, for
>textual content the reference format is a book. The Book Interface[tm],
>determined by the paper size and margins, is almost strictly portrait with an
>aspect ratio of 4x3 or thereabouts. This is not without reason: it is harder
>to read long lines.
>
>Consequently, a lot of users surfing mostly information pages have their
>browsers in a portrait-sized window. This is also the default for Netscape to
>come up with. The width varies - on my 1024x768 screen I have the outer 
>window
>size between 600 and 620, meaning that for content you have ~580 pixels, but
>sometimes I make it smaller in order to fit another window besides it.
>
>Anyway, the only conclusion you can draw from the discussion is not to make
>any assumptions on the screen width, and to attempt to allow for strange
>window sizes as much as possible. This is especially important for
>documentation pages, because they're typically used in a "secondary" window
>besides the "main" window (where the documented piece of software runs). For
>this purpose alone, I'd like the Zope docs to fit in windows as small as, 
>say,
>540 pixels accross...

The point is more that code examples should not wrap, at least not without 
clear visual hints to the user. They are therefore rendered in <PRE> tags, 
that keep the spacing and linebreaks verbatim. All other text does wrap 
automatically to the width of the window. You'll only have to scroll to 
read the <PRE> formatted code examples, a good thing, in my opinion.

The problem lies with the way that browsers wrap text within a tablecell. 
The current Zope site uses a table layout, with navigation on the left, and 
content on the right. Normally, the table is fitted within the visible 
width of the browser, and text is wrapped inside that cell. However, when 
you use <PRE> formatted text within that cell that requires more width than 
is available on screen, the width of the tablecell is expanded to 
accommodate these paragraphs. Thus, the width of the tablecell is expanded 
to allow for the widest <PRE> tag to fit, and all text in that cell is 
rewrapped to the new width. When that width means that the whole table 
doesn't fit within the visible width of the browser, though, you'll have to 
scroll. This is not something the designer of the page can readily influence.

There is no easy solution to this if you want to keep the table layout. 
However, at the bottom of _every_ page on zope.org is a link titled 
'Printable Page', that will display the content _without_ a table layout, 
showing all text neatly wrapped within the visible width of your browser, 
except of course the <PRE> formatted text.

--
Martijn Pieters, Web Developer
| Antraciet http://www.antraciet.nl
| Tel: +31-35-7502100 Fax: +31-35-7502111
| mailto:mj@antraciet.nl http://www.antraciet.nl/~mj
| PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149
------------------------------------------