• Be sure to join the discussion on our discord at: Discord.gg/serebii
  • If you're still waiting for the e-mail, be sure to check your junk/spam e-mail folders

Spoiler Blocks...?

Daisy_Mawile

Pinwheels in the way
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

Just me
Well, if you mean spoilers like here, they'd just require something like this:

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

And in the CSS:

Code:
.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...
 

JKaizer

Ready for a new day
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

Non caedor caedo
JKaizer said:
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.
 
Top