Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: More ways to download code...

by davidrw (Prior)
on Aug 28, 2005 at 12:44 UTC ( #487254=note: print w/ replies, xml ) Need Help??


in reply to More ways to download code...

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


Comment on Re: More ways to download code...
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (9)
As of 2014-07-10 01:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (198 votes), past polls