Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: More ways to download code...

by tye (Sage)
on Aug 28, 2005 at 15:53 UTC ( #487269=note: print w/replies, xml ) Need Help??


in reply to More ways to download code...

I'd find the d/l links on the left much better than centered (the last line of code is very often short and usually not indented much or at all, so putting the link on the left usually makes it closer to the actual code content, making it clearer what it is for). As for the gap, I think this would fix that for CSS-enabled browsers:

.code { margin-bottom: 0; } .embed_code_dl { margin-top: 0; }

Updated CSS that works right now in user-specified CSS is:

tt.code { margin-bottom: 0; } p { margin-bottom: 0; } div.embed_code_dl { margin-top: 0; text-align: left; }

"tt.code" is required because that is what the site CSS uses so ".code" isn't considered specific enough to override. The "p" is needed when "auto" code wrapping is turned on because the HTML produced is <p><tt class="code">...</tt></p><div class="embed_code_od">....

So I'd change the HTML output to <p class="code"><tt class="code>... and change the on-site CSS to use .code instead of tt.code, something like:

.code { margin-bottom: 0; display: block; } .embed_code_dl { font-size: smaller; text-align: left; display: block; margin-top: 0; }

- tye        

Replies are listed 'Best First'.
Re^2: More ways to download code...
by kelan (Deacon) on Aug 29, 2005 at 14:28 UTC

    I know it probably isn't for everyone, but for quite a while I've had code blocks styled with a border around them for easier skimming. This makes it very apparent what the (d/l) links are attached to. Here's the CSS if anyone is interested:

    .code { font-size: 13; display: block; border: 1px solid #666; color: #040; padding: 1em; }
    Modify to taste.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://487269]
help
Chatterbox?
[james28909]: but you have to prepare for it first by adding this to the source
[james28909]: seek DATA, 0, 0; while (<DATA>) { print; }
[Lady_Aleena]: Sounds interesting. Have you written a meditation or cool use for it?
[Lady_Aleena]: It might be something PerlMonks at large would be interested in.

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2017-05-01 00:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I'm a fool:











    Results (543 votes). Check out past polls.