CSS / PHP question

Soldato
Joined
2 Jun 2004
Posts
18,423
I've installed a new theme on one of my forums and I'm tryng to get the header image to change randomly.

I am using rob millers php rotate script, but the banners are not appearing. I think this is because the path is in the CSS file, and not the php header.

This is the CSS...

Code:
#header {
	position: relative;
	height: 120px;
	overflow: hidden;
	background: #3D71AD url(images/banners/rotate.php) 100% 0 no-repeat;
}

Anyone spot any obvious reasons that wouldn't work?
 
It would be useful to know where that css is, relative to the images folder. If the css is in a styles/css/something directory you will need to do ../images/banners/rotate.php .. you need to put the path in relative to the css, not relative to the page that's using it.
 
Well the path to the default header image was "images/header-bg.jpg", so I put my banners folder (which contains 6 banners and the php rotate script) in the images directory, and changed the path accordingly. So I don't think the path is wrong.

It goes like this : forum > themes > mytheme (css file in here) > images > banners.
 
It shouldn't matter, but try switching the background-position and background-repeat values:

Code:
background: #3D71AD url(images/banners/rotate.php) no-repeat top right;
 
Back
Top Bottom