Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

Ugh. I like this in concept but I think the HTML for it is poor:

<p><tt class="code"><font size="-1">my $message=&quot;Hello world\n&qu +ot;;<br /> print $message;<br /> </font></tt></p><div class='embed_code_dl'><a href="?part=1;abspart=1; +displaytype=displaycode;node_id=487248">(d/l)</a></div>

The code is wrapped in <p> tags. The d/l link is wrapped in a <div>. And nothing wraps the two of them to keep them together. If I style my CSS to put a border, some indent, and some margin around my code, the d/l link is on the outside of that. I'd rather see something more like this (indents for clarity of explanation only):

<div class="codeblock"> <div class="codebody"> <tt class="code"> [actual code] </tt> </div> <div class='embed_code_dl'> [the link] </div> </div>

That way, styles that should apply to both can be applied to the "codeblock", and the other styles can be individually set, too.

I also removed the <font> tags in my example -- I think those should be removed from pm wherever they appear as they make custom CSS a real pain. (I just set the font-size style for font tags to be 100% and that seems to defuse them.) If they are deemed "necessary", they should be replaced by a <span> with an appropriate class and the font-size set in CSS. (I'm not saying someone really needs to hunt them down, but when tweaking the HTML output for a section, that's a great time to remove them.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


In reply to Re: More ways to download code... by xdg
in thread More ways to download code... by demerphq

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others romping around the Monastery: (4)
    As of 2014-10-26 00:50 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      For retirement, I am banking on:










      Results (149 votes), past polls