Re: [css-d] Where CSS, XHTML and Javascript meet

From: Date: Mon, 21 Aug 2006 21:05:40 +0000
Subject: Re: [css-d] Where CSS, XHTML and Javascript meet
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-240969@lists.php.net to get a copy of this message
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 [css-d@lists.css-discuss.org] > 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/

« previous php.general (#240969) next »