SV: [Pmwiki-users] Example of problem with long code line

Hugo Fjelsted Alrøe Hugo.Alroe at agrsci.dk
Wed Jan 26 04:18:32 CST 2005


A while a go, I tried to use a css style that gives a scrollbox if the preformatted text is too long for the space on the page. I simply put pre{overflow:auto;} - or a more elaborate version like: pre{border-style:solid; border-width:1px; padding-left:2px; width:80%; overflow:auto; } - in the css file.

I think the pre{overflow:auto;} should be standard in pmwiki if it were not for an inadequacy of MS Internet Explorer to show these boxes in a proper fashion. When a scrollbar is added at the bottom this takes up space inside the box so the last line is hidden - and hence a vertical scrollbar is also needed. This looks especially bad when there is only one line, because then the text in the box is hidden ... (see e.g. http://ecowiki.org/Sandbox/HomePage ). Opera and Mozilla works just fine with respect to scrollboxes.

The only remedy I can see is to add a padding-bottom: 20 px or something in the css, perhaps just for Internet Explorer browsers if one can figure out how to do it, but the unneeded vertical scrollbar will still be there. Anyway, it is better than having too long preformatted text break up the whole page layout.

Kind regards
Hugo


-----Oprindelig meddelelse-----
Fra: pmwiki-users-bounces at pmichaud.com
[mailto:pmwiki-users-bounces at pmichaud.com]På vegne af chr at home.se
Sendt: 26. januar 2005 09:09
Til: John Herbert
Cc: pmwiki-users at pmichaud.com
Emne: RE: [Pmwiki-users] Example of problem with long code line


On Wed, 26 Jan 2005, John Herbert wrote:

> >PmWiki.org seems to be running so I put the example of a long 
> >code line 
> >here:
> >
> >	http://www.pmwiki.com/wiki/Test/LongCodeLine
> 
> With my screen 1024x768 on IE6, no horz. scrolling needed?

Try it again, now you should have to scroll...

(and for those who weren't following... the point is that the text area of 
the page is now much wider than it was before, all because of a single 
space at the beginning of a single line).

/C

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr

_______________________________________________
pmwiki-users mailing list
pmwiki-users at pmichaud.com
http://pmichaud.com/mailman/listinfo/pmwiki-users





More information about the pmwiki-users mailing list