css question
css question
- Started
- Last post
- 4 Responses
- sklassen
is it possible to load a random style sheet each time a page is refreshed so basically a new design, like with the css zen garden, will be displayed randomly each time someone visits or refreshs a page?
any help or direction would be much appreciated!
- warheros0
not sure,
you could have them choose the theme though...
- sklassen0
got some code from a coworker if anyone is interested:
var cssUrlArray = [];
cssUrlArray[cssUrlArray.length] = '1.css';
cssUrlArray[cssUrlArray.length] = '2.css';
cssUrlArray[cssUrlArray.length] = 'dontmatter.css';function writeRandomCSS() {
var rnd = Math.round(Math.random() * cssUrlArray.length);
document.writeln('');
}writeRandomCSS();
- warheros0
sweet!
- Chief0
oh, that's nice.