[thelist] Conditionals in CSS - php?

Tom Dell'Aringa pixelmech at yahoo.com
Thu Sep 30 18:22:21 CDT 2004


I'm wanting to rotate some pictures in the banner of my site. This banner is set by a background
style in my CSS like so:

blah { background: #fff url(somepic.jpg); }

I'm using PHP as my server side scripting. What I want to do is randomize that URL so that it
grabs one of n photos on pageload.

Is there some way I can configure my CSS file to execute php code (with .htaccess perhaps?) Or,
can I actually specify a php file as my style sheet (definitely not ideal - hate to do that

Looking for any suggestions. Thanks!


Get Firefox! | http://www.pixelmech.com/

More information about the thelist mailing list