Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    adj
    adj is offline
    New to the CF scene
    Join Date
    Jun 2007
    Location
    Herault, southern France
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Some .jpg images display in EI but not Firefox



    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">

    <head>

    <meta http-equiv="Content-Type"
    content="text/html; charset=utf-8" />

    <!--meta http-equiv="content-style-type" content="text/css" /-->

    <meta name="keywords" content="XHTML,HTML" />
    <meta name="description" content="homepage of the homepagers" />
    <meta name="revised" content="adj 29.7.07" />
    <title>The homepagers</title>
    <link rel= "stylesheet" type="text/css" href="housestyle.css" media="all" />

    </head>

    <body>

    <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>

    <p>
    <a href="http://validator.w3.org/check?uri=referer"><img
    src="http://www.w3.org/Icons/valid-xhtml10"
    alt="Valid XHTML 1.0 Strict" height="31" width="88" /></a>
    </p>

    <address>
    our address here
    </address>

    </body>

    </html>

    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

  • #2
    Senior Coder twodayslate's Avatar
    Join Date
    Mar 2007
    Location
    VA
    Posts
    1,042
    Thanks
    67
    Thanked 39 Times in 39 Posts
    We need the images. Do you have a live preview? Please use the code tags. Does your page validate?
    twitter | Quality Hosting - $5.95/mo*
    Feel free to PM me!

  • #3
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,726
    Thanks
    6
    Thanked 1,013 Times in 986 Posts
    1. Avoid white spaces in URLs and file names. Use hyphens or underscores.
    2. Have you tried writing the slashes correctly? It should be forward slashes for file paths.

  • #4
    Senior Coder rafiki's Avatar
    Join Date
    Aug 2006
    Location
    Floating around somewhere...
    Posts
    2,046
    Thanks
    19
    Thanked 42 Times in 42 Posts
    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

  • #5
    Senior Coder CFMaBiSmAd's Avatar
    Join Date
    Oct 2006
    Location
    Denver, Colorado USA
    Posts
    3,092
    Thanks
    2
    Thanked 322 Times in 314 Posts
    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.

  • #6
    Regular Coder croatiankid's Avatar
    Join Date
    Jan 2006
    Posts
    665
    Thanks
    1
    Thanked 12 Times in 12 Posts
    Try starting with
    Code:
    file:///C:/
    in your paths

  • #7
    adj
    adj is offline
    New to the CF scene
    Join Date
    Jun 2007
    Location
    Herault, southern France
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks friends. I'll try using images from a public source as you suggest. (Can't think how I turned slashes round, but am eating humble pie).

  • #8
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,726
    Thanks
    6
    Thanked 1,013 Times in 986 Posts
    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.

  • #9
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,315
    Thanks
    29
    Thanked 279 Times in 273 Posts
    Quote Originally Posted by adj View Post
    (Can't think how I turned slashes round, but am eating humble pie).
    The Windows operating system uses backslashes. The Web uses forward slashes.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •