Welcome Guest, Not a member yet? Register   Sign In
images in CSS not loading
#3

[eluser]Nick Husher[/eluser]
The quickest way to debug problems like this is to pull up Firebug and use the CSS viewer to open your background image in a new tab. That'll show you the full URI path the CSS is trying to access. From there you can figure out some solutions on how to keep your CSS working all the time.

One thing to remember is that relative paths in CSS are relative to the location of the CSS, which is not always the same as the location of the document that is making use of that CSS. For instance, my favorite directory structure is this:

Code:
+ assets
| + css
| + img
|
+ system
| ...

Which means that all of my CSS background urls can be relative and of the form
Code:
background: transparent url(../img/html-bg.jpg)
and they will always be guaranteed to work.


Messages In This Thread
images in CSS not loading - by El Forum - 09-02-2008, 12:14 PM
images in CSS not loading - by El Forum - 09-02-2008, 12:17 PM
images in CSS not loading - by El Forum - 09-02-2008, 12:31 PM
images in CSS not loading - by El Forum - 09-02-2008, 12:33 PM
images in CSS not loading - by El Forum - 09-02-2008, 12:36 PM



Theme © iAndrew 2016 - Forum software by © MyBB