tags:

views:

707

answers:

3

I'm having a problem in displaying images in my CSS file.

I have a css file with the following class:

.header
{
 margin-left: auto;
 bla bla
 bla bla
 ...
 background: url(/site_media/header_background.gif) no-repeat top left;
}

When I execute the template with this css, no image is displayed, but when I directly inject the background style into my template it works perfectly.

What am I not doing right?

A: 

Try putting quotes around it.

background: url('/site_media/header_background.gif')
sysrqb
Quotes aren't needed: http://www.w3schools.com/css/pr_background.asp
Ron DeVera
Not needed but good practice to put them in
Greg
+1  A: 

You need to give complete path of header_background.gif relative to your css file location to get this working properly.

Aamir
A: 

Sorry guys! i was using a wrong CSS file! Its working Ok, even without the quotes!, thanks sysrqb

Gath
what a nub mistake
Use Firebugs next time ;)
igorgue