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 someone answered one of your questions - please remember to edit the page and set the status to answered. The status selector is 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 History Action Size Date Who Comment
JPEGjpg scroll_example.JPG r1 manage 15.5 K 2007-11-26 - 12:09 UnknownUser  
Edit | Attach | Watch | Print version | History: r4 < r3 < r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r4 - 2007-11-26 - ArthurClemens
 
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by Perl Hosted by OICcam.com Ideas, requests, problems regarding TWiki? Send feedback. Ask community in the support forum.
Copyright © 1999-2026 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.