Question
PHP inside CSS
Hullo,
I'm trying to work out if I can add PHP script pulling dynamic images from database, inside CSS "background-image url(xx);".
Like this:
#someID {
background-image: url(../randomimage.php)
}
the PHP script works ok (done with ADDT) and shows image ok when run separately. I get no errors from CSS either, but no picture is shown. One or two sites claim that this should be ok... Maybe i'm doing it the wrong way then.
Any ideas, suggestions?
All help welcome.
I'm trying to work out if I can add PHP script pulling dynamic images from database, inside CSS "background-image url(xx);".
Like this:
#someID {
background-image: url(../randomimage.php)
}
the PHP script works ok (done with ADDT) and shows image ok when run separately. I get no errors from CSS either, but no picture is shown. One or two sites claim that this should be ok... Maybe i'm doing it the wrong way then.
Any ideas, suggestions?
All help welcome.
