i have a weird problem i am trying to load an spirte image and get the following error:
“Failed to load resource: the server responded with a status of 404 (Not Found)”
i am loading it like that through css:
background-image: url('/Img/icons.png');
the location is fine cause when i load it through aspx page like that it loads fine:
<img src="Img/icons.png" />
the location is Img/icons.png
and for css its Css/style.css
its on local host
and i cant figure up whats wrong any help will be appreciate
Thanks.
if your css file is in the same folder as your Img folder, try
apart from that, you will have to show us your file structure to understand where the error is. 99.99% you are simply referencing the image with the wrong url.
EDIT:
as per the location you’ve specified, it should be
this:
..means one level above the current location, then look for/Img/icons.png