http://www.perlmonks.org?node_id=645052


in reply to Re^3: Those 'wide load' posts (code)
in thread Those 'wide load' posts

.pre { overflow: auto; }

Note that this sets style for the class "pre", not the element.

You probably want pre { overflow: auto; }. Dunno what browsers support it though.

print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!

Replies are listed 'Best First'.
Re^5: Those 'wide load' posts (code)
by McDarren (Abbot) on Oct 15, 2007 at 22:56 UTC
    Oh, duh.
    Well it's obvious how much I know about CSS, eh? ;)
    Yes, removing the leading period does the trick.
    In my current browser (Firefox 2.0.0.7), I now get a neat horizontal scrollbar (contained within the page) when viewing my pad.

      IE7 appears to ignore pre { overflow: auto; } (which doesn't surprise me much but a quick google search before I posted the first response didn't turn up any information on how widely this is supported like I had hoped). FireFox 2.0.0.7 just wrapped everything so I had to go re-find userContent.css and remove pre { white-space: -moz-pre-wrap; } from it (and then restart FireFox which took two tries, bleh). (And that shows another route to go for those more nostalgic than forward-looking.)

      So, it is an improvement (though I'm sure some will dislike it and need to override it with their own CSS) but not a perfect fix either. Adding to it an item for what PerlMonk <code> tags emit would help alleviate the problem of FireFox still not supporting soft hyphens.

      There is also the possibility of filtering PRE tags similar to how PM filters CODE tags, a long-standing to-do item...

      - tye