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?
Make sure the image path is set correctly in the background-image url. Once you have made sure that your CSS file is linked correctly, also check that the image itself is set correctly. Again, you will want to open your code inspector in the browser to check.
that is because you have set the background color, and then overwritten it by using the background shorthand…. either move the background-color call after the background shorthand, or add it TO the shorthand… the browser interprets your current code like this…
The alt attribute is meant to be used as an alternative text if the image is not available. Text-only browsers cannot display images and will only display the text specified in the alt attribute.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With