View Single Post
07-11-2008, 11:50 PM
#4
scrappy is offline scrappy
scrappy's Avatar
Status: Member
Join date: Aug 2006
Location: Newcastle upon Tyne
Expertise:
Software:
 
Posts: 172
iTrader: 1 / 100%
 

scrappy is on a distinguished road

Send a message via MSN to scrappy

  Old

Ok, I went to give this a go today and then remembered that my banner image was a div background image which was set using my css file.

Below is an extract from the CSS file for that div. Can anyone tell me how to get it working?

Code:
#banner {
	background-image:url(images/banner.jpg);
	background-repeat:no-repeat;
	width:798px;
	height:188px;
	float:left;
	}
I tried this, but it did not work:

Code:
#banner {
	background-image:url(images/rand/<?php echo rand(0,2); ?>.jpg);
	background-repeat:no-repeat;
	width:798px;
	height:188px;
	float:left;
	}
Obviously I had two banners contained within a file called rand which again was in the images folder.

Does anyone have any thoughts? I really need to get this working.