I am developing my site and running on the local host now on windows computer. I want to set a background image for the page but when I run the server it throughs a message that the image is not found. The image is located in the same directory where the html is. This is a really simple thing but I am straggling with it from early morning. Looked in all the forums but nothing helped so far.
I tried changing the file path as relative/absolute. But no result. No mistake in the file name or path.
body {
background-image: url("background.jpg")
}
Try this:
Note: I assume that you are using Django because of the tags, it is better to re-locate your static image files under the directory
publicorstaticwhich is publicly accessible from the web server.