[pmwiki-users] Srolling boxes

Patrick R. Michaud pmichaud at pobox.com
Wed Jun 7 01:02:54 CDT 2006

On Wed, Jun 07, 2006 at 04:27:51PM +1200, John Rankin wrote:
> On Wednesday, 7 June 2006 3:26 PM, pmwiki at 911networks.com wrote:
> >John Rankin wrote:
> >>> for making boxes, Is there a way to keep it from expanding and 
> >>> making it scroll if it's wider than the screen?
> >> 
> >> add width=650px overflow=auto and that should do it.
> >> 
> >Wonderful, that's very appreciated. I have searched and cannot 
> >find it on pmwiki.org, I even did a search on box and width 
> >and... where is it?
> >
> Well, it's really a CSS trick rather than a pmwiki feature.
> Still, it's sufficiently useful that it perhaps ought to be an
> example in the wiki styles documentation. Or even a feature of
> the default pmwiki style sheet for the <pre> tag... Going to a
> wiki page with a long line of preformatted text is an unhappy
> experience.

Unfortunately, the overflow=auto property tends to be a bit buggy.
For example, adding "overflow=auto" causes my browser (Firefox 
to chop off any text outside of the preformatted box and not provide
the scrollbars.  That is, it works exactly the same as "overflow=hidden", 
which means that people running Firefox in Linux wouldn't have any way 
of seeing the preformatted content that gets "chopped off".

On the other hand, "overflow=visible" seems to work nicely in Firefox,
both Linux and WinXP versions.  The scrollbar appears at the bottom of
the page, and the long lines extend beyond the right margin but don't
increase the overall page width.

Unfortunately, the wrench in the works is (as always) Internet Explorer,
which doesn't know how to deal with "overflow=visible".

Still, it might be worthwhile for the default skin to set "overflow=visible"
on preformatted blocks, which would be of great benefit to those who have
escaped or otherwise avoided the Internet Explorer prison.

I have a demonstration page at http://www.pmwiki.org/wiki/Test/PreOverflow,
and browsercam shows the overflow settings in different browsers at
http://www.browsercam.com/public.aspx?proj_id=258259 .  Some interesting
observations from browsercam:

  -- Note especially the first image (Firefox 1.5.0  under Linux FC4),
     where "overflow=auto" has the effect of chopping off the text
     without providing the scrollbar.
  -- IE 7.0 Beta 2 *still* doesn't know how to deal with "overflow=visible".  :-(
  -- All of the IE scrollbars for "overflow=auto" hide the last line of 
     preformatted text; that is, one has to scroll vertically in order to 
     see the last line.


More information about the pmwiki-users mailing list