Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
BTW, personally I'd like it if the link were closer to the code block vertically, but I haven't quite worked out how to do it, as it seems to vary anyway, at least in Firefox anyway.
Can you put the code block and the d/l link in a table so they're side by side? or does that cause problems with the code wrapping?
# current: <pre><tt class="code"><font size="-1">my $message=&quot;Hello world\n& +quot;; print $message; </font></tt></pre><div class='embed_code_dl'><a href="?part=1;abspart= +1;displaytype=displaycode;node_id=487248">(d/l)</a></div> # like this? <table cellpadding="0" cellspacing="0" border="0"><tr><td> <pre><tt class="code"><font size="-1">my $message=&quot;Hello world\n& +quot;; # adding filler lines # adding filler lines # adding filler lines print $message; </font></tt></pre> </td><td valign="bottom"> <div class='embed_code_dl'><a href="?part=1;abspart=1;displaytype=disp +laycode;node_id=487248">(d/l)</a></div> </td></tr></table>
Not sure what the valign should be by default.. i think you can equally argue for all 3.


Or even like this (but requires changing "dev.embed_code_dl" in the style sheet to be ".embed_code_dl" or "td.embed_code_dl"). Note that the valign should be added to the embed_code_dl class as well.
<table cellpadding="0" cellspacing="0" border="0"><tr> <td><pre><tt class="code"><font size="-1">my $message=&quot;Hello worl +d\n&quot;; # adding filler lines # adding filler lines # adding filler lines print $message; </font></tt></pre></td> <td class='embed_code_dl'><a href="?part=1;abspart=1;displaytype=displ +aycode;node_id=487248">(d/l)</a></td> </tr></table>

Update: hmm.. i think if the above is done, that multiple "(d/l)" links on a node (for example 487227) won't be aligned horizontally (i.e. all directly above each other) unless a td width for the left cell is specified...

In reply to Re: More ways to download code... by davidrw
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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 04:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found