Don't forget that you can also do the CSS inline:

<body style="background: url(/images/$random_image)">

And then also in the CSS file have all the other declarations for the body tag.

--
Kevin Murphy
Webmaster: Information and Marketing Services
Western Nevada Community College
www.wncc.edu
775-445-3326


On Aug 21, 2006, at 12:50 PM, Dave Goodchild wrote:

You're right, a bit off-topic, as is my answer. You could use php, ie have
more contro, as it's server-side ie

the php array

$classes = array('class1', 'class2', 'class3'); ?>

the xhtml with php dynamics

<body class="<?php echo array_rand($classes); ?>">

then in the css, for example

body .class1 {
background: url(/images/class1.jpg);
}

body .class2 {
background: url(/images/class2.jpg);
}

...let me know if this is a viable approach for you and we can continue off
list.


--
http://www.web-buddha.co.uk
http://www.projectkarma.co.uk
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7b2 testing hub -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to