PDA

View Full Version : Spoiler Blocks...?



Daisy_Mawile
22nd February 2006, 11:36 PM
Hi. I'm making a li'l mini-site for my Pokemon 'fic (which will not be suitable for viewing for a LONG time, so I'm not posting it here). It is to include separate pages for character profiles, for the human characters and each of their Pokemon. I'm wanting to set it up so that the Pokemon's pages can be reached from their trainers' pages, but this adds the problem of spoilers, and I'm wondering this: Are spoiler tags only usable in forums, or is there some mysterious HTML code for it that allow use in webpages?

Dragonfree
22nd February 2006, 11:41 PM
Well, if you mean spoilers like here, they'd just require something like this:


<span class="spoiler">This is a spoiler which should not be read until highlighted</span>

And in the CSS:


.spoiler {
background:#000000;
color:#000000;
}

It's as simple as that. You can add a border or whatever around the spoiler if you want, too...

Virtual Headache
22nd February 2006, 11:42 PM
No, spoiler tags aren't only for forums.
Just give the font the same backgorund color as the font itself and it will look like a spoiler.

Here is an example:

<b>Spoilers (attention):</b><div style="color:white; background-color:white;">Text </div>

JKaizer
25th February 2006, 4:20 PM
Do you really need to declare the font size? That'd just make it cumbersome if you change it on the overall style sheet.

<b>Spoilers (attention):</b><br />
<div style="color: #FFFFFF; background-color: #FFFFFF;">Spoiler Text Goes Here</div>

Magma Leader Maxie
25th February 2006, 5:02 PM
Do you really need to declare the font size? That'd just make it cumbersome if you change it on the overall style sheet.

<b>Spoilers (attention):</b><br />
<div style="color: #FFFFFF; background-color: #FFFFFF;">Spoiler Text Goes Here</div>

Errm... if you plan on making more than one piece of text hidden by a spoiler, then use Dragonfree's method. That way, it's loaded in the Style Sheet, and you don't have to add massive tags every time. It makes it easier to edit your page later. And in CSS files (or between <stlyle> tags, same thing) it is quite easy to find your way around your code, whereas in massive HTML docs, leftover tags when you delete parts occur.

So, I suggest you declare the .spoiler class, and then adding a spoiler later on is a piece of cake.

JKaizer
25th February 2006, 5:37 PM
Yeah... ^^ I was just mainly replying to pikah's post though~

Virtual Headache
25th February 2006, 7:41 PM
Do you really need to declare the font size? That'd just make it cumbersome if you change it on the overall style sheet.

I just took it directly from my forums and forgot to remove the size.
Oh well...
*takes it out*