Re^3: Those 'wide load' posts (code)
by McDarren (Abbot) on Oct 15, 2007 at 22:43 UTC
|
"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.
| [reply] [d/l] [select] |
|
|
.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!
| [reply] [d/l] [select] |
|
|
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.
| [reply] |
|
|
|
|
|
Re^3: Those 'wide load' posts (code)
by mr_mischief (Monsignor) on Oct 17, 2007 at 16:29 UTC
|
That's working on blocks with a class of 'code', and it seems the code tags get output as pre blocks with that class. | [reply] |
|
|
Yes, there were either two errors in the original (thinking that <code> tags get output and that ".X" selects <X> tags) or just one typo (writing ".pre" instead of "pre"). Since the node was about <pre> tags, I just assumed the former and didn't go look up CSS selector syntax.
To collapse the overlapping corrections from multiple replies, you'd want selectors of ".code" (class="code") and "pre" (<pre>) to get both types of blocks.
and it seems the code tags get output as pre blocks with that class
Sure, it seems that way to you. :) But PerlMonks <code> blocks are not output as <pre> blocks for me (because I mostly browse PerlMonks with a browser that has supported the standard soft hyphen (­) for years, unlike FireFox, and so I can use "auto code wrap"). So it is better to use ".code" for selecting code blocks than "pre" (especially since the next major release of FireFox will finally support ­ properly and "auto code wrap" rocks compared to fixed-width code wrapping so many will likely enable it.
| [reply] [d/l] [select] |
|
|
Which browser are you using that doesn't get:
<pre class="code">
in the page source? I'm seeing the same in Firefox 2, IE 7, Opera 9, Konqueror, and links. | [reply] [d/l] |
|
|
|
|