...

View Full Version : Background image is in a directory behind the stylesheet



ghostz00
07-16-2007, 03:36 PM
This is probably a simple answer, but I can't seem to get it to work other than using:


background:url("http://myurl.com/images/background.gif");

The Style sheet is located: myurl.com/css/style.css

Is it ok to leave it in the url form? I would think it might add some extra loading time.

thanks in advance,

koyama
07-16-2007, 03:44 PM
This is probably a simple answer, but I can't seem to get it to work other than using:


background:url("http://myurl.com/images/background.gif");

The Style sheet is located: myurl.com/css/style.css

In that case this should be working:

background:url("../images/background.gif");

Is it ok to leave it in the url form? I would think it might add some extra loading time.
I should not make any difference. But using a relative path may be better if you one day choose to move the site to another domain. You wouldn't have to modify your style sheet.

ghostz00
07-16-2007, 03:53 PM
Thanks a lot. That worked, I didn't know that you could use that shorthand in the css.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum