View Single Post
07-17-2008, 01:41 AM
#9
xdoomx is offline xdoomx
Status: Member
Join date: Feb 2005
Location: Quebec, Canada
Expertise:
Software:
 
Posts: 441
iTrader: 1 / 100%
 

xdoomx is on a distinguished road

Send a message via AIM to xdoomx Send a message via MSN to xdoomx

  Old

Add a class to your div, something like img1, img2, img3, etc.

Code:
div.img1 {background: url(/image1.jpg);}
div.img2 {background: url(/image2.jpg);}
div.img3 {background: url(/image3.jpg);}
Then just use the same PHP code given in this thread earlier to generate the class name instead of the image.

Code:
<div class="img<?php echo rand(0,2); ?>"></div>