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

"I hope someone can do the footwork to validate the other half.."
hmm, unless I'm doing something wrong, I'd have to say that it doesn't seem to work. I've added .pre { overflow: auto; } to my Onsite CSS Markup under Display Settings, and then added some extra-wide text contained in <pre> tags to my pad - but it doesn't autowrap.

Replies are listed 'Best First'.
Re^4: Those 'wide load' posts (code)
by Sidhekin (Priest) on Oct 15, 2007 at 22:49 UTC

    .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!

      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