Go Back   CodingForums.com > :: Client side development > HTML & CSS

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 07-29-2007, 11:29 PM   PM User | #1
adj
New to the CF scene

 
Join Date: Jun 2007
Location: Herault, southern France
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
adj is an unknown quantity at this point
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
adj is offline   Reply With Quote
Old 07-30-2007, 12:10 AM   PM User | #2
twodayslate
Senior Coder

 
twodayslate's Avatar
 
Join Date: Mar 2007
Location: VA
Posts: 1,042
Thanks: 67
Thanked 39 Times in 39 Posts
twodayslate is on a distinguished road
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!
twodayslate is offline   Reply With Quote
Old 07-30-2007, 12:11 AM   PM User | #3
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,607
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
  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.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 07-30-2007, 12:15 AM   PM User | #4
rafiki
Senior Coder

 
rafiki's Avatar
 
Join Date: Aug 2006
Location: Floating around somewhere...
Posts: 2,034
Thanks: 18
Thanked 42 Times in 42 Posts
rafiki will become famous soon enough
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
__________________
Get Firefox Now
rafiki is offline   Reply With Quote
Old 07-30-2007, 12:30 AM   PM User | #5
CFMaBiSmAd
Senior Coder

 
CFMaBiSmAd's Avatar
 
Join Date: Oct 2006
Location: Denver, Colorado USA
Posts: 2,712
Thanks: 2
Thanked 251 Times in 243 Posts
CFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the roughCFMaBiSmAd is a jewel in the rough
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.
CFMaBiSmAd is offline   Reply With Quote
Old 07-30-2007, 08:50 AM   PM User | #6
croatiankid
Regular Coder

 
croatiankid's Avatar
 
Join Date: Jan 2006
Posts: 665
Thanks: 1
Thanked 12 Times in 12 Posts
croatiankid is on a distinguished road
Try starting with
Code:
file:///C:/
in your paths
__________________
Hrvoje
Croatiankid designs
Downtown host
croatiankid is offline   Reply With Quote
Old 07-30-2007, 12:10 PM   PM User | #7
adj
New to the CF scene

 
Join Date: Jun 2007
Location: Herault, southern France
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
adj is an unknown quantity at this point
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).
adj is offline   Reply With Quote
Old 07-30-2007, 02:12 PM   PM User | #8
VIPStephan
The fat guy next door


 
VIPStephan's Avatar
 
Join Date: Jan 2006
Location: Halle (Saale), Germany
Posts: 7,607
Thanks: 5
Thanked 865 Times in 842 Posts
VIPStephan is a jewel in the roughVIPStephan is a jewel in the roughVIPStephan is a jewel in the rough
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.
__________________
Don’t click this link!
VIPStephan is offline   Reply With Quote
Old 07-30-2007, 10:18 PM   PM User | #9
Arbitrator
Senior Coder

 
Arbitrator's Avatar
 
Join Date: Mar 2006
Location: Splendora, Texas, United States of America
Posts: 2,900
Thanks: 5
Thanked 187 Times in 184 Posts
Arbitrator is on a distinguished road
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.
__________________
Please for the love of god stop making IE. You current "browser"s cause me to cry every day. —Phil *
Arbitrator is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:41 PM.


Advertisement
Log in to turn off these ads.