html - Failed to load resource: the server responded with a status of 404 (Not Found) error in server -


i'm trying load image in image folder, it's not working.

upon debugging, see error:

failed load resource: server responded status of 404 (not found)      

my image coding in .css file is,

background: url("../images/bgbody.png") no-repeat;     

what doing wrong here?

use browser's network inspector (f12) see when browser requesting bgbody.png image , absolute path it's using , why server returning 404 response.

...assuming bgbody.png exists :)

is css in stylesheet file or in <style> block in page? if it's in stylesheet relative path must relative css stylesheet (not document references it). if it's in page must relative current resource path. if you're using non-filesystem-based resource paths (i.e. using url rewriting or url routing) cause problems , it's best use absolute paths.

going relative path looks store images separately stylesheets. don't think idea - support storing images , other resources, fonts, in same directory stylesheet itself, simplifies paths , more logical filesystem arrangement.


Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -