[Zope] Zope.org site text should wrap

Thomas B. Passin tpassin@mitretek.org
Mon, 1 Nov 1999 11:29:41 -0500


From: Martijn Pieters <mj@antraciet.nl>


>At 21:11 29-10-99 , Thomas B. Passin wrote:
>>Many pages on the zope.org site are annoying to read because they don't
>>word-wrap.  This is probably caused by a width="100%" attribute in the main
>><table> tag.  On most pages with this problem, getting rid of the widh="100%"
>>lets the text wrap like it should.
>>
>>Whoever is the template custodian, please let our text wrap!
>>
>>Thomas Passin
>
>This has nothing to do with the width=100%, but everything with the use of
>the PRE tag for examples. Text marked up with PRE will not wrap, therefore
>pushing the margins, which in turn widens the table cell, which in its turn
>makes _all_ text wrap around at this new width.
>
>PRE tags are automatically added when using example code in Structired Text
>documents.
>
>--

I realize that PRE blocks do what you say, but I meant something else.  Look at
the main www.zope.org page.

Drag your browser window until it is too narrow for the text.  At some point as
you make the window more narrow, the text in the right column will be cut off
rather than wrap.  Also notice that the navigation items in the upper right go
off-screen to the right rather than wrap.  It is this truncation that is
annoying.  Remember too, many people use 800 X 600 resolution on their browser,
so pages appear much wider than with higher resolution.  These people will be
much more likely to encounter this behavior.

In this particular case, the problem might not be with a table width per se, but
could be with some images whose width is specified to be too large. Or maybe a
combination.  You can verify the role of the WIDTH attribute in preventing
wrapping in tables by saving the Zope home page as a file.  You can make the
right-hand column and navigation items wrap better by making this change near
the start of the <BODY>:

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#000066" VLINK="#606060"
TOPMARGIN="0" LEFTMARGIN="0" MARGINWIDTH="0" MARGINHEIGHT="0">
 <BASEFONT FACE="Verdana, Arial, Helvetica, sans-serif" SIZE="2">

   <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="100%">
   <TR>
    <TD WIDTH="10" BGCOLOR="#000000" ALIGN=CENTER>&nbsp;</TD>
    <TD COLSPAN="2" BGCOLOR="#6699CC" VALIGN="TOP" WIDTH="300"><A HREF="/"><IMG
SRC="/Images/zopelogo.jpg" ALT="Z Object BORDER="0"></A></TD>
<!--================ Change the following line from ===========-->
    <TD BGCOLOR="#6699CC" VALIGN="TOP" ALIGN="RIGHT" WIDTH="99%"
CLASS="welcome">
<!--================= to this ===========================-->
    <TD BGCOLOR="#6699CC" VALIGN="TOP" ALIGN="RIGHT" xWIDTH="99%"
CLASS="welcome">

Changing from "WIDTH" to "xWIDTH" inactivates the width statement.  Reload the
page.  Now start making the browser window more and more narrow.  You will see
that the navigation section still wraps until the window gets much narrower than
before. Also, the middle column now can wrap. Unfortunately, there still comes a
time when the right column and navigation items stop wrapping and become
truncated.  I haven't yet been able to find what causes this.  It must be the
specification of some width or height, or maybe several interacting ones.  Other
Zope pages act in a similar way, but it often is not so noticable because one
tends to look at the text in the middle rather than the navigation.  But some
pages with wide text or several text columns are more likely to get truncated.
The old zope site has this problem more severely.

Maybe there are too many interacting parts on the pages to completely solve the
problem, but I would really appreciate some degree of improvement.  Even the
small change above makes the pages better for me, and, I am sure, many others
too.

Tom Passin