Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re^3: Those 'wide load' posts (code)

by mr_mischief (Monsignor)
on Oct 17, 2007 at 16:29 UTC ( [id://645495]=note: print w/replies, xml ) Need Help??


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

That's working on blocks with a class of 'code', and it seems the code tags get output as pre blocks with that class.

Replies are listed 'Best First'.
Re^4: Those 'wide load' posts (selectors)
by tye (Sage) on Oct 17, 2007 at 16:43 UTC

    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 (&shy;) 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 &shy; properly and "auto code wrap" rocks compared to fixed-width code wrapping so many will likely enable it.

    - tye        

      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.

        Browsers have no control over what HTML PerlMonks chooses to emit. And, no, PerlMonks does not sniff user-agent strings in order to customize the HTML that it emits. Turn on "auto code wrap" (but don't forget to turn it back off; it is in one of the PerlMonks 'settings' pages) if you want to see different HTML emitted for <code> blocks.

        - tye        

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://645495]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2024-04-25 18:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found