Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: More ways to download code...

by bmann (Priest)
on Aug 30, 2005 at 20:43 UTC ( [id://487940]=note: print w/replies, xml ) Need Help??


in reply to More ways to download code...

Update 3: To duplicate this, turn on "Auto code wrapping" in user settings.

It looks like the 'p class="code"' element is being closed prematurely.
<p class="code"></p><div class="codeblock"><tt class="codetext">my $me +ssage="Hello world\n";<br> print $message;<br> </tt></div> <!-- </p> should be here, not before opening <div> -->

That p tag should wrap the entire codeblock.

Either way, thanks for all the work!

Update: This change breaks any css using the .code selector (including the blue web-safe Perl-blue theme).

Update 2: Not necessary any more, demerphq++ fixed it (div became span). "On-site css markup" fix:

p.code { display: none } div.codeblock { display: block; border: 1px solid #666; color: #069; padding: 1em; }

Replies are listed 'Best First'.
Re^2: More ways to download code...
by demerphq (Chancellor) on Sep 01, 2005 at 08:39 UTC

    This is odd. I see the following markup (with a few line breaks added inside of tags to make it easier to read:

    <p class="code"><div class='codeblock'><tt class='codetext'><font size +="-1">my $message=&quot;Hello world\n&quot;;<br /> print $message;<br /> </font></tt></div><font size='-1'><div class='embed-code-dl' ><a href="?part=1;abspart=1;displaytype=displaycode;node_id=487248" >&#91;download&#93;</a></div></font></p>

    I thought it might be a glitch in the HTML cleaning code we have, but it doesn't appear to be so. Likewise I've inspected the code and I dont see how the html youv'e posted could be generated. Since I can't repeat the bug I'm not sure how to proceed with this.

    What browser are you using?

    Update: I've worked it out. The problem was nesting a div inside of a p is apparently illegal, so if you had CSS keyed on the p tag it would show up as _though_ it was an empty p block even thought it wasnt really. Ive changed things so that when p tags are used the internal sections are spans and not divs. From what i can tell this sorts it all out. I also checked the Perl-Blue scheme and it seems to look fine.

    ---
    $world=~s/war/peace/g

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (2)
As of 2024-04-20 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found