Tags:
create new tag
, view all tags

Question

Hi, Can anyone explain why using verbatim or pre tags within a TWiki table results in following:
| <verbatim>zzzzzzzzzzzzzzzzzzz zzzzzzzzzzz zzzzzzz z z zzzzzzzzzzzz z zzzzzzzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  zzzzzzzzzzz zzzzz zzzz zzzz zzzzzzz zzzzzzz z z zzzzzzzz zzzz z zzzz zzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  z</verbatim> | 

zzzzzzzzzzzzzzzzzzz zzzzzzzzzzz zzzzzzz z z zzzzzzzzzzzz z zzzzzzzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  zzzzzzzzzzz zzzzz zzzz zzzz zzzzzzz zzzzzzz z z zzzzzzzz zzzz z zzzz zzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  z

In example above, I first put the source table within verbatim tags to illustrate syntax I used. It scrolls fine - scroll bar is just as wide as the page. In second, I used the verbatim tag within a table as I would like to use it and no scroll bar is rendered, text is carried ff the page. On my site this is rendered a little different in IE:

scroll_example.JPG

In FF, is yet again different - no scroll bar at all in verbatim text, text is carried off of page.

Any way to force verbatim text to fit within a table cell? I have already tried to use tablewidth attribute and a div with width defined. Neither have changed the appearance.

Thanks.

Environment

TWiki version: TWikiRelease04x01x02
TWiki plugins: DefaultPlugin, EmptyPlugin, InterwikiPlugin
Server OS: RHEL3 01, kernel 2.4.21
Web server:  
Perl version: 5.8
Client OS:  
Web Browser:  
Categories:  

-- MichelleAlbertin - 26 Nov 2007

Answer

ALERT! If you answer a question - or have a question you asked answered by someone - please remember to edit the page and set the status to answered. The status is in a drop-down list below the edit box.

Rendering pre text inside table celss is a problem for most browsers.

You can try with the CSS style table {table-layout: fixed;}, but you cannot use that for all tables. If set in a site-wide style sheet it would mess up tables in other topics.

Example:

%TABLE{id="test"}%
| <verbatim>zzzzzzzzzzzzzzzzzzz zzzzzzzzzzz zzzzzzz z z zzzzzzzzzzzz z zzzzzzzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  zzzzzzzzzzz zzzzz zzzz zzzz zzzzzzz zzzzzzz z z zzzzzzzz zzzz z zzzz zzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  z</verbatim> | 

<style>
table#test {table-layout: fixed;}
</style>

Renders as:

zzzzzzzzzzzzzzzzzzz zzzzzzzzzzz zzzzzzz z z zzzzzzzzzzzz z zzzzzzzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  zzzzzzzzzzz zzzzz zzzz zzzz zzzzzzz zzzzzzz z z zzzzzzzz zzzz z zzzz zzzzzzzzzz  zzz zzz zzz zzz zzz z z z z z z zzzzz z zz  z z  z  z

-- ArthurClemens - 26 Nov 2007

Thanks Arthur, that did the trick in IE6 though in FF there is still no scroll bar at all (on my TWiki) and my left and top bars have disappeared (the text, not the bars themselves). Odd. This forum topic however renders the same in IE6 and FF.

-- MichelleAlbertin - 26 Nov 2007

Odd. TablePlugin creates a table with id tabletest when I write id="test". That looks like a bug. In the meantime try to use tabletest in your stylesheet.

-- ArthurClemens - 26 Nov 2007

 
Change status to:
Topic attachments
I Attachment Action Size Date Who Comment
Unknown file formatJPG scroll_example.JPG manage 15.5 K 2007-11-26 - 12:09 MichelleAlbertin  
Topic revision: r4 - 2007-11-26 - ArthurClemens
 
Twitter Delicious Facebook Digg Google Bookmarks E-mail LinkedIn Reddit StumbleUpon    
  • Download TWiki
TWiki logo Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.