Bookmark / hyperlink not working in IE

M

Michael Laplante

Okay, wtf is going on in IE? At the top of my page:

<div id="guardian">
<img alt="guardian (7K)" src="image/guardian.gif" height=
"101" width="381">
</div>

At the bottom of my page:
<a href="#guardian">Back to top</a>

Link works in Gecko browsers, but not IE. Help!

(Note: Page isn't up yet so can't give URL.)

M
 
J

Jonathan N. Little

Michael said:
Okay, wtf is going on in IE? At the top of my page:

<div id="guardian">
<img alt="guardian (7K)" src="image/guardian.gif" height=
"101" width="381">
</div>

At the bottom of my page:
<a href="#guardian">Back to top</a>

Link works in Gecko browsers, but not IE. Help!

(Note: Page isn't up yet so can't give URL.)

Well, put it up temporarily, because we cannot tell from what you
posted. Problem maybe elsewhere like a duplicate id.
 
E

\(Elmo\)

I just tried it in IE6 locally, and it worked just fine.
I added it to a long page I had created already.

Michael Laplante said:
Okay, wtf is going on in IE? At the top of my page:

<div id="guardian">
<img alt="guardian (7K)" src="image/guardian.gif" height=
"101" width="381">
</div>

At the bottom of my page:
<a href="#guardian">Back to top</a>

Link works in Gecko browsers, but not IE. Help!

(Note: Page isn't up yet so can't give URL.)

M



*** ***
 
B

Barbara de Zoete

Try <a href="./pagename.html#guardian">Back to top</a>

Better yet: just leave it out. In my browser [Ctrl]+[Home] does that job
perfectly well. I don't need a webauthor to provide functions in the page
that are provided for.
 
M

Michael Laplante

Better yet: just leave it out. In my browser [Ctrl]+[Home] does that job
perfectly well.

Not all people are as conversant with keyboard shortcuts as the people in
this ng. But, otherwise, yes, a good suggestion. . .thx.

M
 
A

Andy

(Elmo) said:
I just tried it in IE6 locally, and it worked just fine.
I added it to a long page I had created already.

I usually use:
<a name="top" id="top">

so I think that would make your <div id = ***> into <a name= "guardian"
id="guardian">

Hope that helps.
 
H

Harlan Messinger

Michael said:
Never mind previous post. The page is up temporarily at:
http://www3.telus.net/public/tao55/temp/comments.htm

No images uploaded but the rest is there. . .

Still doesn't work in IE but works fine in FF. What gives?

When I save your file to my own server it works. When I also save your
CSS file to my server, then it doesn't work. There's something about the
way your CSS is laying out your page that is causing IE not to be able
to figure out how to move to the right place. I suspect it's the
absolute positioning.
 
J

Jonathan N. Little

Neredbojias said:
To further the education of mankind, "Michael Laplante"


I saved it both as "web page" and copy-paste the text, and it works. Did
you try Jim Moe's suggestion?

Must be something with the absolute positioning, not sure what because
#heartbeat moves you to the top but not #guardian!

Simple solution:

<a href="#heartbeat">Back to top</a>

or waste hours trying to figure out IE's quirks, of course running in
quirks mode is not help your situation:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
 
M

Michael Laplante

Jonathan N. Little said:
Neredbojias wrote:
Must be something with the absolute positioning, not sure what because
#heartbeat moves you to the top but not #guardian!
or waste hours trying to figure out IE's quirks, of course running in
quirks mode is not help your situation:

FWIW, I did try it in strict mode but no diff. Thanks for the look. . . I'll
experiment with the absolute positioning thing.

M
 
M

Michael Laplante

Jim Moe said:
Try <a href="./pagename.html#guardian">Back to top</a>

No go, I'm afraid. A little experimentation reveals the problem to be the
#guardian definition in the style sheet. It absolutely positions a graphic
wrt to the top and left hand edges of the page. Take away the positioning
and the link works fine. Why that should be is a mystery to me. Will keep
experimenting. . .

M
 
J

Jonathan N. Little

Michael said:
FWIW, I did try it in strict mode but no diff. Thanks for the look. . . I'll
experiment with the absolute positioning thing.

Did not say switch you DocType would solve you problem, but being in
quirks mode is certainly not helping your situation. New docs should be
strict
 
N

Neredbojias

To further the education of mankind, "Jonathan N. Little"
Must be something with the absolute positioning, not sure what because
#heartbeat moves you to the top but not #guardian!

Simple solution:

<a href="#heartbeat">Back to top</a>

It's funny it works locally but not online, though. Gotta be a bug.
 
M

Michael Laplante

It's funny it works locally but not online, though. Gotta be a bug.

I can't even get it to work locally. I played around last night -- it's some
sort of interaction thing between the two top graphics (guardian and
heartbeat) but damn if I can figure it out.

M
 
J

Jonathan N. Little

Michael said:
I can't even get it to work locally. I played around last night -- it's some
sort of interaction thing between the two top graphics (guardian and
heartbeat) but damn if I can figure it out.

options:

1) switch to strict doc type and refrain from reliance on absolute
positioning, many times you can get the same effect without

2) switch "to top" link to anchor on element that is not positioned
absolutely

3) forget the "to top" link
 
M

Michael Laplante

Jonathan N. Little said:
options:

1) switch to strict doc type and refrain from reliance on absolute
positioning, many times you can get the same effect without

2) switch "to top" link to anchor on element that is not positioned
absolutely

Probably go with 2, or use margins to set graphics rather than abs. pos.
Thx.

M
 
J

Jonathan N. Little

Michael said:
Probably go with 2, or use margins to set graphics rather than abs. pos.
Thx.

I would go with #1 and use margins you will discover an added benefit
that with page will print more reliably
 

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

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top