Pages: 12
Here's the code:
[quote]//This is a shakiro214 production
//In cooperation with friendsterTalk forum
buffy = new Array();
buffy[0]="[b]CSS_URL_1[/b]";
buffy[1]="[b]CSS_URL_2[/b]";
angel=Math.floor(Math.random() * buffy.length);
try{
document.createStyleSheet(buffy[angel]);
}
catch(e){
var css = document.createElement("link");
css.type = "text/css";
css.rel = "stylesheet";
css.href=buffy[angel];
css.media = "screen, print";
document.getElementsByTagName("head")[0].appendChild(css);
}[/quote]
To add more layouts, simply add more arrays, like so
[quote]buffy[2]="[b]CSS_URL_3[/b]";
buffy[3]="[b]CSS_URL_4[/b]";
buffy[4]="[b]CSS_URL_5[/b]";[/quote]
and so on...
If you want to use this for both IE and firefox and you are already using my 2 seperate CSS codes, simply change the name of the buffy array and the angel index when inserting the code for the second browser.
Here's a full example of what a combined code would look like, if you use seperate CSS files for IE & FF:
<">To see my [b]2 seperate CSS: 1 for IE & 1 for FF code[/b] click
[url=http://theftalk.com/t11644-seperate-files%3A.html]here[/url]
[b]That's it. You're done![/b]
Last edited by shakiro214 (2008-03-09 12:46:51)
... hmmm nice... i'll try this one... Last edited by blurrycloud (2007-09-24 17:23:41)
And then I think I saw it again on Dale's profile bcoz, I think his themes are random also.
Now I can do it too
weeeeeeeeee
It should work in FF
Last edited by shakiro214 (2007-09-24 18:27:05)
Last edited by sickofyou (2007-09-24 18:30:05)
I'm just saving the world before bedtime
different layout every visit..
like this better than the theme switcher thingy...
keeps me busy
I just added a Harry Potter CSS to my profile. Weeeeeeeee
All I need now are different cursors bcoz I'm using the same 1 for all of them