@aris
Glad it was of use.
***Started typing, and testing Absolam's method before Aris's reply, so now posting in general to show the implementation of this method for any non-coders interested***
absalom wrote:
Or you could just include a randomised id that cascades through the body..
i.e
#page1 has 1 image, #page2 has another and so on.. Just remember to keep everything apart from the image calls themselves in the body CSS definition.
I use this on my own site.. (nice rotating images via CSS is way cool)

All in all, it's only 2 extra lines of code in the template itself. The CSS will have varying mileage, as I use over a dozen rotating images on my site, which means it can be done through the stylesheet.

Horses for courses-- which is not a criticism, just a fact.
This is yet another solution. However, it means that filenames are hardcoded in the css (ok for static items).
Depending on your needs, Absalom's solution may well be the better choice.
Following his method, you would have in your css, something like
Code:
#page1{
background: url(../images/indent3.png) top left repeat;
}
#page2{
background: url(../images/01.gif) top right repeat-y;
}
... etc
and in the index.php file
Code:
<?php $random_top = 2; // you would have to set this using the number of css entries as above.
$random = rand(1, $random_top); //pick a number any number ?>
<body id="page<?php echo $random;?>">
(I have left the $random_top to seperate the max level of the random generator.)
It means editing css each time you change/add/remove an image, and considering the amount of css code, not difficult at all.
[edit]-- also means you have tight control over the images in rotation, and can stop one or more by editing css. [/edit]
The method I put up, allows you to just drop images into the dedicated directory, and they will be selected.
[edit]-- to remove image from rotation, you need to delete the image from the directory [/edit]
As I said, horses for courses.
Choose your steed
