Jump to content

[SOLVED] Anchor problem with IE and FF


SkyRanger

Recommended Posts

I am having a problem with IE reading anchors.  I can get it to work in FF but IE7 just doesn't like them.  Has anybody else had this problem if so how can I fix it.

 

Link on one page is:  link.php?id=4#bottom

 

On the link.php page at the bottom it would have <a name="bottom">

 

As I said, works no problem in FF but having problems in IE

Link to comment
Share on other sites

Ok, so instead of using <a name="#bottom">, I would use <div name="#bottom">?

 

No, I recommended using ID instead of NAME:

<div id="bottom"></div>

 

Also, you've got to make sure that you're closing out your elements.

Link to comment
Share on other sites

Seriously? Since when did anchors apply to divs?

 

since for ages!

 

I have not used a named anchor for longer than I can remember. Since there was once a point where the name attribute was marked as deprecated (and recinded I beleive as they forgot how they were gonna tackle radio and option groups) in favour of the id attribute.

 

Name has never been a valid attribute for any tag bar anchor and form elements.

Link to comment
Share on other sites

Seriously? Since when did anchors apply to divs?

 

since for ages!

 

I have not used a named anchor for longer than I can remember. Since there was once a point where the name attribute was marked as deprecated (and recinded I beleive as they forgot how they were gonna tackle radio and option groups) in favour of the id attribute.

 

Name has never been a valid attribute for any tag bar anchor and form elements.

Name has always been valid for form elements, since HTML 0.9.

Link to comment
Share on other sites

All i want to know is why:

 

link.php?id=1#bottom

 

is not working for me in ie7

 

when i use either:

 

echo "<div id=\"bottom\"></div>";
or
echo "<a name=\"bottom\">

 

I also tried on the same page using

 

<a href=\"#bottom\"></a>

 

And that never worked either in IE7

Link to comment
Share on other sites

Ok, checked it in FF, Opera and IE7 and FF IE plugin

 

FF - Works

Opera - Works

IE7 - Doesn't Work

FF IE Plugin - Doesn't work.

 

 

 

I checked a very simple test page in IE7 and it does work.

 

<a href="#anchor">Jump</a>
<P>lorem ipsum
<P>lorem ipsum
<P>lorem ipsum
<P>lorem ipsum
[ enough to make it scroll ..... ]
<a name="anchor"></a>
<h3>The Anchor</h3>

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.