Re: Watermark background

Discuss anything that involves Wikifang, the Telefang Wiki, here.
Post Reply
Milnivri(imported)
Posts: 351
Joined: Wed Dec 27, 2006 10:14 pm

Re: Watermark background

Post by Milnivri(imported) »

OK this is what I planned to do:

On pages which are Telefang-exclusive there would be a Telefang watermark image as the background of the article (the one in Telefang 2 before a battle).
Same for Dino Device and Bugsite.

And because you can't select the parent element of an element with that class, I was thinking of doing that with Javascript.

Code: Select all

if (getElementsByClassName(document, "span", "jsbg-tf")) document.getElementById("article").className+=" tf";
And use this in the HTML/Template:

Code: Select all

<span class="jsbg-tf"></span>
And then use this in the CSS:

Code: Select all

.article {background-image:url(URL);}
But somehow I can't get it to work. The script needs to be below the HTML span tag. How? I can't move it down.
Post Reply