[Pmwiki-users] scrollbox style for preformatted text

Hugo Fjelsted Alrøe Hugo.Alroe
Wed Sep 8 02:32:57 CDT 2004


I would like to use a css style that gives a scrollbox for preformatted text. This will be usefull in connection  with perl and xml code text that we are working with (in connection with an open source archive for research papers). In this code text the lines are often too long to fit on a screen. This is inconvenient, especially since I have my sidebar on the right :-)

I first thought that I could have a line with .scrollbox{overflow:auto;} in pub/css/local.css and use this in a WikiStyle of the form %scrollbox%. But in pmwiki preformatted text, coded as <pre></pre>, is rendered by way of having a space at the beginning of the line, and I could not see how to make a WikiStyle with scrollbox that would be placed as class="scrollbox" inside the <pre> tag.

So I thought I could simply use pre{overflow:auto;} in pub/css/local.css - or a more elaborate version like:
pre{border-style:solid; border-width:1px; padding-left:2px; width:80%; overflow:auto; }

But it seems like I cannot get this to work. It works fine when I use it as an in-file css style in a simple html file. And I can see that the wiki-pages refer to the correct css file.

What am I doing wrong?

Hugo, ecowiki.org on pmwiki-0.6.20



More information about the pmwiki-users mailing list