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="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="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="Hello worl
+d\n";
# 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...
-
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.
|