...

View Full Version : CSS Background-Image Path?



dniwebdesign
04-22-2005, 12:39 PM
.catrow { font-weight:bold; height:24px; line-height:150%; color:#4C77B6; background-image: url(imgs/main/main_bg.gif); }

Got me the nice code above... however the image does not show on the PHP page I have. The path goes directly to the image and if I use:

<td background="imgs/main/main_bg.gif">
It works fine. Why can't I see it with the CSS?

_Aerospace_Eng_
04-22-2005, 12:41 PM
Can we see your html for the page also, or just give us a link?

dniwebdesign
04-22-2005, 12:42 PM
http://www.dni-server.no-ip.com/scripts.demos/dlcount1_1/add.php

Once it's all finished she will be password protected ;)

_Aerospace_Eng_
04-22-2005, 12:57 PM
I can't see why it wouldn't work, but you may want to check out and see what the validator says here (http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.dni-server.no-ip.com%2Fscripts.demos%2Fdlcount1_1%2Fcss%2Fadmin.css&usermedium=all)
you have some parse errors, and some errors, because you are trying to use some CSS that doesn't even exist. This could also be a server error, because according to Firefox, the background image in that cell is pointing to here
http://www.dni-server.no-ip.com/scripts.demos/dlcount1_1/css/imgs/main/main_bg.gif so you may have to go back a few directories, possibly one directory, because the images are in relation to the CSS file not your actual page so instead of

.catrow { font-weight:bold; height:24px; line-height:150%; color:#4C77B6; background-image: url(imgs/main/main_bg.gif); }
try

.catrow { font-weight:bold; height:24px; line-height:150%; color:#4C77B6; background-image: url(./imgs/main/main_bg.gif); }

dniwebdesign
04-22-2005, 01:17 PM
Well, if it is in relation to the css directory that would be my problem...



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum