| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2007
Posts: 11
|
Image paths in CSS
How do I define image paths for background in CSS? My images are located in images/gradients/header/bg.jpg and the CSS file is located in global/css/global.css Code:
This doesn't work. |
|
|
|
|
|
#2 (permalink) |
|
Senior Member
Join Date: Dec 2006
Location: Switzerland
Posts: 318
|
try: Code:
or using full path: http://www.yourdomain.com/... Depends on your folder structure and where the files are located. if you put a ".." goes up to the parent folder of the current one. |
|
|
|
#3 (permalink) |
|
SkyRocket Design
Join Date: Aug 2005
Location: Chichester
Posts: 538
|
might have to be ../../ as you've got to get out of css first then global SkyRocket Design :: website design chichester
|
|
|
|
#4 (permalink) |
|
i'm done, son
Join Date: Jan 2005
Posts: 12,262
|
That link is relative to the site root. It won't work if it's not on a web server. Does it know the root URL - either the server's web root or one defined using a <base />? Also, I believe quote marks (single or double) are not supposed to be there, but that's not causing your problem. |
|
![]() |