Some jpg images do not display in Firefox 2.0.0.4 but do in IE 6.0
I am still developing this site, and plan to use different images when I can get them, but I am puzzled. The two images in a separate folder (2nd h2 - "imgtourfront" & 3rd h2 - "img tour") open in IE but not in Firefox - though Firefox does display the logo in the 1st h2 - logo+text bw.jpg in h2 "page"
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<ul class="navbar">
<li><a href="hometest.html">The Homepagers' Home Page</a></li>
</ul>
<h2 class="page">
The Homepagers' Home Page
<img src="logo+text bw.jpg" alt="logo + text bw" height="120" width="120"/>
</h2>
<h2
class="imgtourfront">
<img src="C:\documents and Settings\Andrew\My Documents\house
\party july04\dom de la tour front.jpg" alt="domaine de la tour front" height="160" width="200" />
</h2>
<h2 class="img tour">
<img src="C:\documents and Settings\Andrew\My Documents\house\party july04\dom de la tour back.jpg" alt="domaine de la tour"
height="160" width="200" />
</h2>
I don't think it's an XHTML problem because w3 liked it - see pretty certificate - but what is it with these browsers ?
Incidentally if anyone can explain the line 11 meta http-equiv I would be grateful - I put it in because someone said I should, but it seemed to er, mess things up, so I commented it out. Obviously I am very new to this and grateful for any help, Andrew
if using spaces in file names/paths replace the space with %20 and VIPStephan is right, you should not be using \ and you should not be using images from my documents you should be using from a webserver where the path is www/public_html/something/pages/images/house.jpg or something similar
File system paths mean nothing in <img src="..." tags. You need to use a url that is http/https accessible. The following has no meaning to most browsers -
Code:
<img src="C:\documents and Settings\Andrew...
This only works in IE because IE does not bother to follow common sense rules and specifications.
__________________
If you are learning PHP, developing PHP code, or debugging PHP code, do yourself a favor and check your web server log for errors and/or turn on full PHP error reporting in php.ini or in a .htaccess file to get PHP to help you.
Well, actually if you have your website on your computer you should keep the HTML file and the respective images together. That will not only keep things together and in order but it also helps if you, as you are doing now, have to embed/link to other files of that site.
That means if you kept your HTML files and your images in a directory (with the images in a separate sub directory, to keep the root clean) then you would only need to write relative paths, i. e.:
Code:
<img src="images/pic1.jpg" alt="" />
Using absolute paths on your hard drive will eventually just lead to problems/more work becaue you’d need to change them once you upload the files.