tags:

views:

613

answers:

1

I have run into a strange problem. When I use:

background-image: url(none);

in my css file, it generates an error in the apache log file:

File does not exist: /...../styles/none, referer: http://blabla.com/styles/styles.css

I have used the W3C CSS validator and there are no errors (just some warnings about floats needing widths).

I used to have:

background-image: none;

but I have changed all instances and the most up-to-date stylesheet is used.

Is this normal behaviour or is it more likely that I have an error somewhere in my stylesheet?

+11  A: 

This is normal. By using the url() syntax, anything you put into the brackets is considered to be a URL. The browsers are making an http request for a resource called none.

Basically, you've specified an invalid url for a background image.

zombat
Thanks! Is there a way around it, for example by using background-image:none or is that invalid css?
jeroen
"background-image: none" is the best way to go, it's definitely valid css. Take a look at http://www.htmlhelp.com/reference/css/color-background/background.html for more on the various background property elements and the shorthand syntaxes.
zombat
"background-image: none" is a good and correct way of specifying it.
womp
Thanks all, problem solved!
jeroen