Strange IMG problem with IE

G

Guest

Hi folks,

I´ve a strange problem with the IMG-Tag in IE.

Here´s my code:

<div id="menu"><img alt="" src="./img/logo01.jpg"><br>

<table>
<tr>
<td><img src="./img/button.jpg" alt=""></td>
</tr>
....

</table>


Firefox shows the logo01 and the button image fine.

But IE only shows the logo01 image and cannot find the button.jpg.


The CSS definition looks like this:

div#menu {
position: absolute;
top: 100px;
left: 0px;
width: 183px;
height: 600px;

}


Does anybody have an idea what happens?



Regards,

Martin
 
A

Adrienne Boswell

Gazing into my crystal ball I observed =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=
I¶ïve a strange problem with the IMG-Tag in IE.

Here¶ïs my code:

<div id="menu"><img alt="" src="./img/logo01.jpg"><br>

Are you sure of where the image is? Make sure the directory is correct.
 
G

Guest

Adrienne said:
Are you sure of where the image is? Make sure the directory is correct.

Of course I´m sure.
I wrote that it works with Firefox. So the directory must be correct ;)


Regards,
Martin
 
A

Adrienne Boswell

Gazing into my crystal ball I observed =?UTF-8?B?TWFydGluIFDDtnBwaW5n?=
Of course I´m sure.
I wrote that it works with Firefox. So the directory must be correct
;)

Got a URL?
 
T

TC

Martin said:
Hmmm very strange!

The online version works, also with IE:

http://www.erfolgreich-beraten.de/michael/index.html

But when I open the local version on my pc with IE (WinXP system)
it does not work.

What happens? :(

Well, you need to debug it! Here's what I'd do:

- suppress all the CSS; (eg. change "/css/..." to "/ZZcss");
- copy the second img tag to a place outside the table;
- copy the first img tag to a place inside the table;
- copy the src value from the working img tag, to the not-working one;
- remove the DOCTYPE;
etc.

Those changes are not for the purpose of fixing the problem - they are
for the purpose of finding out what is causing the problem. For
example, if suppressing the CSS makes the image appear, then, the
problem is something to do with the CSS, and so on.

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com
 
D

Dylan Sung

Martin Pöpping said:
Hmmm very strange!

The online version works, also with IE:

http://www.erfolgreich-beraten.de/michael/index.html

But when I open the local version on my pc with IE (WinXP system)
it does not work.

What happens? :(

I'm not sure what you mean, I tried

http://www.erfolgreich-beraten.de/michael/img/logo01.jpg

and it is there, and

http://www.erfolgreich-beraten.de/michael/img/button.jpg

is also there. It appears four times on the left in the index.html file you
gave. Perhaps, it is an IE problem locally. Clear the cached files first and
start again. Tools > Internet Options > Temperary Internet Files - select
delete files, then ok. Then refresh the index page again by pressing F5.

Dyl.
 
D

dorayme

Martin Pöpping said:
Hi folks,

I´ve a strange problem with the IMG-Tag in IE.

Here´s my code:

<div id="menu"><img alt="" src="./img/logo01.jpg"><br>

<table>
<tr>
<td><img src="./img/button.jpg" alt=""></td>
</tr>
...

</table>

At least in my copy of this post of yours, there is a missing
stop in the above. src="./etc" should have ../

That's how I do it to go up a directory anyway...
 
J

Jonathan N. Little

dorayme said:
At least in my copy of this post of yours, there is a missing
stop in the above. src="./etc" should have ../

That's how I do it to go up a directory anyway...

No he has it correct if the relationship is below

http://www.erfolgreich-beraten.de/michael/index.html
http://www.erfolgreich-beraten.de/michael/img/logo01.jpg

'./' means current folder so

'./img/logo01.jpg' is eq to 'img/logo01.jpg'

'../img/logo01.jpg' would create the incorrect path

'http://www.erfolgreich-beraten.de/img/logo01.jpg'
 
D

dorayme

At least in my copy of this post of yours, there is a missing
stop in the above. src="./etc" should have ../

That's how I do it to go up a directory anyway...

No he has it correct if the relationship is below[/QUOTE]

The things I don't know! I use "this.html" to stay in the same
directory and "this.html" to really stay in the same directory
and "this.html" to really really stay in the same directory (hey
Luigi, this is childish, no?) and "../this.html" to up one and
"../../this.html" to up two and so on. This is the world I know
and live in.

But I have now learnt something new from you... who would have
thought one dot would mean something?

By the way, Jonathan, I came across a nice book on CSS the other
day in my local library, nicely written, clear and so on and the
authors seem to know what they are talking about. Cascading Style
Sheets Third Edition, by Hakon Wium Lie and Bert Bos (obviously
Martians... what earthlings would have such names...). This is a
welcome change from the last terrible book I saw.
 
T

Toby Inkster

dorayme said:
The things I don't know! I use "this.html" to stay in the same
directory and "this.html" to really stay in the same directory

You should use "./this.html" to really stay in the same directory.
and "this.html" to really really stay in the same directory

For that purpose, try "././this.html".

There's also "./././this.html" to really really really stay in the same
directory.
But I have now learnt something new from you... who would have
thought one dot would mean something?

Anyone who knows a little about UNIX (and indeed Windows) directory
structure should know that every directory (except the root one) contains
two special subdirectories:

. (a reference back to itself)
.. (a reference to its parent)

so "cd ." does nothing, as does "cd ././.". (The root directory doesn't
contain "..", but does still contain ".".)

The main important use of links starting with "./" is relative linking
from, say:

http://www.example.org/foo/bar.html to
http://www.example.org/foo/

where you'd simply write '<a href="./">Foo</a>'.
 
C

Chris F.A. Johnson

On 2006-07-31, Toby Inkster wrote:
[snip]
Anyone who knows a little about UNIX (and indeed Windows) directory
structure should know that every directory (except the root one) contains
two special subdirectories:

. (a reference back to itself)
.. (a reference to its parent)

so "cd ." does nothing, as does "cd ././.". (The root directory doesn't
contain "..", but does still contain ".".)

The systems I use have .. in the root directory, e.g.:

$ ls -la /
total 92
drwxr-xr-x 24 root root 4096 Jul 30 04:02 .
drwxr-xr-x 24 root root 4096 Jul 30 04:02 ..
 
H

Harlan Messinger

dorayme said:
No he has it correct if the relationship is below

The things I don't know! I use "this.html" to stay in the same
directory and "this.html" to really stay in the same directory
and "this.html" to really really stay in the same directory (hey
Luigi, this is childish, no?) and "../this.html" to up one and
"../../this.html" to up two and so on. This is the world I know
and live in.

But I have now learnt something new from you... who would have
thought one dot would mean something?[/QUOTE]

The main reason you would use it is to link to the current directory
itself, i.e., its default resource, without naming it explicitly:

href="./"

Otherwise, I don't think there's much reason to use it.
 
T

Toby Inkster

Chris said:
The systems I use have .. in the root directory, e.g.:

$ ls -la /
total 92
drwxr-xr-x 24 root root 4096 Jul 30 04:02 .
drwxr-xr-x 24 root root 4096 Jul 30 04:02 ..

Right you are. Mine does too. Windows doesn't though. (In fact, I don't
think the root directory even contains ".".)
 
C

Chris F.A. Johnson

Right you are. Mine does too. Windows doesn't though. (In fact, I don't
think the root directory even contains ".".)

Does Windows even have the concept of a root directory? Doesn't
each filesystem have its own?
 
J

jojo

Harlan said:
The main reason you would use it is to link to the current directory
itself, i.e., its default resource, without naming it explicitly:

href="./"

Otherwise, I don't think there's much reason to use it.

You do not have top use it to link the directory itself, href="" works
perfectly.
 
J

Jonathan N. Little

Toby said:
Right you are. Mine does too. Windows doesn't though. (In fact, I don't
think the root directory even contains ".".)

Doesn't display '.', '..' in the listing when in the root but will list
all the same

dir
dir .
dir ..
dir .\
dir ..\
 
J

Jonathan N. Little

jojo said:
You do not have top use it to link the directory itself, href="" works
perfectly.
1) Don't think <a href="">Null Link</a> is valid
2) href="" != href="./"

the null link will be uninterpreted by many browsers as 'current page'
and the latter will be the 'current directory' not at all the same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,134
Latest member
Lou6777736
Top