User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 374,546 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,653 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 3087 | Replies: 6
Reply
Join Date: Nov 2004
Posts: 225
Reputation: sam1 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

.gif in firefox

  #1  
Mar 8th, 2007
HI,

I have a html page that should display a .gif picture, it does show it with IE but i cant view it with mozzilla firefox.

Is there any option i can check in firefox or do i have to edit the html file?

thank you
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2006
Location: Sofia, Bulgaria
Posts: 135
Reputation: Rhyan is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 7
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Junior Poster

Re: .gif in firefox

  #2  
Mar 8th, 2007
Originally Posted by sam1 View Post
HI,

I have a html page that should display a .gif picture, it does show it with IE but i cant view it with mozzilla firefox.

Is there any option i can check in firefox or do i have to edit the html file?

thank you


Normally it is the other way arround .
Are you sure you've inserted the image correctly?
Check your paths and whether the image was not cached in IE cache.
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
Reply With Quote  
Join Date: Nov 2004
Posts: 225
Reputation: sam1 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: .gif in firefox

  #3  
Mar 8th, 2007
i have checked it three times now. it is fine with IE but not firefox. it gives me a blank space for the image with a "x" sign at the top right....:-|
Reply With Quote  
Join Date: Oct 2006
Location: Sofia, Bulgaria
Posts: 135
Reputation: Rhyan is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 7
Rhyan's Avatar
Rhyan Rhyan is offline Offline
Junior Poster

Re: .gif in firefox

  #4  
Mar 8th, 2007
Originally Posted by sam1 View Post
i have checked it three times now. it is fine with IE but not firefox. it gives me a blank space for the image with a "x" sign at the top right....:-|

My friend,

If you have empty space with red cross - this means that the path is wrong, or image name is wrong, or something like that, so FF cannot find the image.

1. Check your path once again.
2. Check image name - there should be no spaces. Use underscore instead.
" Of all the things I've lost,
I miss my mind the most...."
Mark Twain
Reply With Quote  
Join Date: Nov 2004
Posts: 225
Reputation: sam1 is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 0
sam1's Avatar
sam1 sam1 is offline Offline
Posting Whiz in Training

Re: .gif in firefox

  #5  
Mar 8th, 2007
thanks for your reply.

I checked the path and image name, but still doesnt help. if the path or image was wrong how come it loads it using IE.
this is what i got for the image tag:

<img src="C:\webroot\images\logo.gif" width="650" height="110">

ps. sorry about my earlier post i get broken picture sign when loading it with firefox.
Last edited by sam1 : Mar 8th, 2007 at 2:50 pm.
Reply With Quote  
Join Date: Jan 2007
Posts: 2,433
Reputation: MidiMagic is on a distinguished road 
Rep Power: 6
Solved Threads: 99
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Posting Maven

Re: .gif in firefox

  #6  
Mar 8th, 2007
Try opening it with the "open file" entry in the File menu of Firefox.

The trouble is probably that you are addressing a path on your own computer.

I didn't know you could put a DOS/Windows path in the src attribute. Maybe the trouble is that IE allows that, but Firefox doesn't.

Subdirectories and folders normally use forward slashes in internet addressing, not backslashes.

The correct url is:

 src="/webroot/images/logo.gif"
Daylight-saving time uses more gasoline
Reply With Quote  
Join Date: Jul 2006
Location: Deptford, London
Posts: 916
Reputation: MattEvans will become famous soon enough MattEvans will become famous soon enough 
Rep Power: 5
Solved Threads: 46
Moderator
Featured Poster
MattEvans's Avatar
MattEvans MattEvans is offline Offline
Posting Shark

Re: .gif in firefox

  #7  
Mar 9th, 2007
if you want to link to a local file as the image; use the 'file' protocol explicitly:
<img src="file:///C:\webroot\images\logo.gif" width="650" height="110">
maybe those (\) should be the other way round; so if it doesn't work like that; try:
<img src="file:///C:/webroot/images/logo.gif" width="650" height="110">
Also, check out: http://en.wikipedia.org/wiki/File:_URL

It loads without in IE because IE perhaps 'expects' windows/DOS paths.. It's not a correct URL though; because unless an URL is relative or root-relative; it has to have a protocol specified.

Putting an url like this src="/webroot/images/logo.gif" will work; but it's deceptive because it's root-relative to a local drive; wheras on the web; it'll be root relative to a 'home' or 'My Documents' folder (depending on the server OS, and may be different); with a document root folder inside.

That is; if/when you put your page online; it's likely that the document root folder will be at the level of 'webroot', so your url will end up "/images/logo.gif". On the server; the root-absolute path "/images" may end up pointing to a folder like; "/home/sam1/htdocs/images" (if you're on a linux server running apache); and that might be accessible from the web as : "http://www.sam1.com/images". However; the URL: "file:///c:\anything" is only accessible on your computer.

You can get around that by making ALL links relative (i.e: if your page is in a folder "C:\webroot\stuff\index.html"; and the image is in the folder "C:\webroot\images\logo.gif"; make the src="../images/logo.gif") but; that can get reaaaally difficult to manage. Or, upload your images to where you want them to be on the web, and use an HTTP protocol url i.e. "http://www.sam1.com/images/logo.gif". If you don't do something like that; and you make everything absolute with reference to your filesystem; you'll have to go and change all your links when you come to upload your site to the server.
Last edited by MattEvans : Mar 9th, 2007 at 6:38 am.
If it only works in Internet Explorer; it doesn't work.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb HTML and CSS Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the HTML and CSS Forum

All times are GMT -4. The time now is 4:09 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC