+ 2
Background image doesnt show up. XAMPP error 404
HI everyone I want an image as background, but it doesnt show up. I am suing XAMPP. So, both css file and image file are in the same folder under htdocs folder. I checked the url path. it is correct. The file is also exist. but It said Failed to load the resources. Responed with a status 404 (not found) why? and how to solve this? thanks
8 Respostas
+ 3
Still not working
I am curious about .htaccess as you said before.
I read it controls for folder permission.
maybe it is related to it. You asked me to show you .htaccess code.
I found some of .htaccess. which one do you want? and which part?
please help me..and thanks you very much
+ 2
Which url you use to embed your image file to your localhost. You have to use
http://localhost/im/image_name.JPG
also if you do that thing then try to open them in browser with this url. if They open clear cache of your browser. And open your localhost again. If it show you same thing. That must be cause by .htaccess
and show your .htaccess code here
+ 2
Both file are in the same foler.
C:/xampp/htdocs/mywebsite/file.css
C:/xampp/htdocs/mywebsite/image.jpeg
css code just like this :
body{
background-image: url(image.JPEG);
}
what is .htaccess and where I can find it?
thanks
+ 2
You should use
http://localhost/mywebsite/image.jpeg
above url to open image file in browser. If it open use this url instead of just writing image.jpge
This is wrong syntax C:/xampp/htdocs/mywebsite/image.jpeg
on localhost.
+ 2
Does this below urls return 404 error.
http://localhost/mywebsite/image.jpeg
http://localhost/mywebsite/file.css
if it show you an error than show your .htaccess code that is outside of your mywebsite folder.
+ 1
I just read about it.
I should write or activate it. XD
let me check it
+ 1
Problem is solved gentlemen. The cause is wrong ext of the image. It should jpg, not jpeg.
Thank you everyone
0
Anita, check out my code labeled EP~Dare to compare it may help you with your question