Issue
body {
background-image: url(/images/background.jpg);
background-position: center center;
background-repeat: no-repeat;
background-attachment: fixed;
background-size: cover;
}
For some reason I'm getting this error:
GET http://localhost/images/background.jpg 404 (Not Found)
And also I'm kind of confused why the link is http://localhost/images/background.jpg instead of http://localhost/[project_name]/images/background.jpg
Solution
I found the solution.
- I don't need to write '/' at the beginning of the path
- I need to go up on 1 level in catalog because I'm in css folder
So the path should look like this:
background-image: url(../images/background.jpg);
Answered By - Coder4Fun250
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.