Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
The stupid question is the question not asked
 
PerlMonks  

How to present spoilers :-)

by tilly (Archbishop)
on Oct 26, 2000 at 01:43 UTC ( [id://38538]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to RE: Fun Regex Exercise
in thread Fun Regex Exercise

Actually HTML has a wonderful way to do spoilers, an example is below. Highlight it if you actually need an explanation of the trick.

Spoiler

The trick is that you write a table with the font and the background color the same. When someone highlight's it they can read the spoiler, but otherwise they cannot.

In this case I did it like this:

<table><tr><td bgcolor=#000000><font color=#000000> put text here and then </font><td></tr></table>
Unfortunately links show through because the rules for the HTML here don't include (that I saw at least) a way to control the color of an HREF. Which is why the link is down there and not in here. :-)

Wish I could claim it was my idea, but one of the folks at IWETHEY (namely CRConrad) came up with it.

Replies are listed 'Best First'.
RE: How to present spoilers :-)
by merlyn (Sage) on Oct 26, 2000 at 03:56 UTC
    <table><tr><td bgcolor=#000000><font color=#000000> put text here and then </font><td></tr></table>
    If you're gonna do that, at least make it legal HTML by putting the needed quotes around the attributes!

    -- Randal L. Schwartz, Perl hacker

RE: How to present spoilers :-)
by puck (Scribe) on Oct 26, 2000 at 04:46 UTC
    You can solve the problem with the colour of the hyperlinks by using Cascading Style Sheets.

    I've changed the colours on my homepage and also removed the underline from the links.

    Update: Putting underlines for links is sooo ugly! :)

    Cheers!

(crazyinsomniac) Re: How to present spoilers :-)
by crazyinsomniac (Prior) on Feb 21, 2001 at 03:22 UTC

    I am the ultimate spoiler

    The trick for including links of different color, aside from changing body attributes is to do the following:
    <a href="/index.pl?node_id=10277"> <font color="#000000"> slick </FONT> </a>
    I'm a slick one ain't i?

     
    ___crazyinsomniac_______________________________________
    Disclaimer: Don't blame. It came from inside the void
    perl -e "$q=$_;map({chr unpack qq;H*;,$_}split(q;;,q*H*));print;$q/$q;"

Re: How to present spoilers :-)
by demerphq (Chancellor) on May 18, 2005 at 10:17 UTC

    Just so folks know should they stumble on this node there is now support for <spoiler> tags in PM. They can be configured to render just like this too. :-) IOW, please DONT follow the advice here from tilly, just use the correct tags.

    ---
    $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://38538]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.