0

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?

1
  • Can you post the "bla bla bla"? A missing ";" in there could be the reason it's not working Commented Mar 27, 2009 at 12:46

3 Answers 3

1

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

Sign up to request clarification or add additional context in comments.

Comments

0

Try putting quotes around it.

background: url('/site_media/header_background.gif')

Comments

0

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.