Page is a not externally linkable
- Code, Content, and Presentation
-- CSS
---- background-image not showing up


lucy24 - 9:54 pm on Mar 10, 2012 (gmt 0)


but if you try it with a css file, then the way you've got it written at the moment, the image would have to be in the same directory as the css file.

Other way around. Relative links in external css are treated as relative to the file that uses the css, not to the css itself.

I only know this because I've gone through the "get it wrong + test it" loop about eight times in the past year. Ahem.

Site-absolute links are guaranteed to work correctly. The drawback is that you can't test them locally except by installing a pseudo-server like MAMP or WAMP. (And then jumping through further hoops if you're testing more than one domain.)


Thread source:: http://www.webmasterworld.com/css/4427584.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com