Forum Moderators: open
The code for my image displaying div is as follows:
CSS:
#header
{
display:block;
background : #fff;
color : #333;
border : 0 none inherit;
margin : 0;
padding : 0;
text-align : left;
}
#header img
{
margin : 0;
padding : 0;
border : 0 none inherit;
}
in my HTML: I am accessing the image as follows:
<div id="header">
<img src="C:\Documents and Settings/XY/Desktop/website/dna_22.bmp" border="0">
</div>
What is wrong with this code?Why is the image not getting displayed in Firefox?some one help me out.
Thanks.
The dimensions of the image are width: 750px height: 140px.
Please help me out.
Thanks
1. Begin the link with file://localhost/
2. Replace the spaces with %20
3. No backslashes for Firefox
This should work:
<img src="file://localhost/C:/Documents%20and%20Settings/XY/Desktop/website/dna_22.bmp">
But it's much better to use a relative path than an absolute path for local viewing purposes across browsers. Assuming the html document is also in the "website" directory, just be simple --
<img src="dna_22.bmp">
I haven't hosted the site as yet.
You should probably turn that image into a compresed format (gif, png, jpg) before you put it on the server.
Then, the linking is easy -
"images/filename.ext"
So far as this being a browser issue, I've never had Firefox balk except occassionally bkgnd. images need a <br style="clear:both;" /> before closing the final div.
You might also consider that IE accepts 'slop' and F-fox won't - validate your code to see if anything's awry.
Good luck,
El