0

I get a console error when I try to set a background image using CSS.

My CSS code is:

body {

background-image: url("background.png");
background-repeat: no-repeat;}

The error

GET http://localhost/myWeb/css/background.png 403 (Forbidden).

The CSS file and the image are in the same location.

1
  • 8
    Looks like an access issue. Make sure that IIS has an access to this file. Commented Dec 26, 2015 at 12:46

1 Answer 1

1

you should check file permissions for image background.png ..

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

1 Comment

actually, it is a correct answer. My case the png file permission was -rw-------, after I changed to -rwxr-xr-x, it worked.

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.