I have this line of CSS code here…
background-image:url(upload/<?php echo $array['image']; ?>);
but the dang thing ain’t working, all I get back is a blank screen, The image is in the database and also on the server in the right file. Does PHP not work with CSS?
This is not a CSS File
Thanks in advanced,
J
here is the full line of code…
<div style="width:100%; position:relative; margin:0 auto; padding-top:80px; height:350px; background-image:url(upload/<?php echo $array['image']; ?>); background-repeat:no-repeat; background-size:100%; text-align:center; padding-bottom:40px;">
Step 1:
I think you just missed quotes for
url('something')so it should be like this:
Step 2:
If that doesnt work, show us exact output, not just “its not working”, copy part of source code of displayed page so we can see if the value is printed correctly for example
Step 3:
If that still doesnt work, i suggest you using “inspect element” function of some browsers to see what is problem. I can suggest Firebug extension for Firefox