Page 1 of 1

Re: Watermark background

Posted: Sat May 03, 2008 8:19 pm
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.