It seems that linked stylesheets have trouble mapping background images with the syntax

.element{background-image: url(your_image.png);}

Has anyone else run into this? It is maddening. And enjoy the new form… it took some work. 🙂 Have a good weekend everyone.


  1. James Sumners says:

    What element are you trying to apply the class to? That would make a big difference. Plus, you need to quote the source of the image for it to be "proper." For example: .element { background-image: url('background.gif'); } Of course, you could be a little more complete and flesh out the whole background: .element { background: red url('background.gif') top left; } That way you can see if the element is even getting the properties applied because their background would be red of the image doesn't show.


  2. Mr Frosti says:

    I think that it is a compatibility issue with a linked stylesheet. My temporary workaround was to just include the style in the header of this page. I was attempting to apply this to a table TR element, with no result. And I tried quoting also, single and double with no result. I appreciate the tips though, its probably something small I am overlooking.


  3. James Sumners says:

    A stylesheet is a stylesheet is a stylesheet. It does not matter how it is included in the document. Every single stylesheet used on The Underground and my page are linked. You can use them for an example as they do include background images.


  4. Mr Frosti says:

    Wow, I figured it out during a flash of insight. I assumed that the locations listed in the stylesheet pointed to the directory of the page linked from. The relative position of all elements on my stylesheet were "yadda/yadda/styles/name_of_image". The images were in the root folder. I figured it would be something that simple.


Leave a Comment

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.