The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Design Load random CSS on page load Reply To: Load random CSS on page load


thanks. That will help a lot.
Only thing i have to figure out is how to use the PHP’s mt_rand() function. We will see.

By now i managed to be successful with this javascript. I created a empty div in html and multiple div.random- css designs.
But i am not sure if it works with a additional logo implemented in css.

<script type=”text/javascript”>

document.getElementsByTagName(‘body’)[0].className+=’ random-‘ + Math.floor((Math.random() * 3) + 1);