# Anchor links don't display properly in IE 7



## crisbastap (Oct 16, 2002)

I am using anchor tags in a web page. One, named "Bottom", is at the top of the page and takes you to a div tag at the bottom of the page. The other, named "Top", is at the bottom of the page and takes you to a div tag at the top of the page. These anchors and div tags work fine in Firefox v.3, but not in IE v.7. What happens in IE is, when I click the anchor at the bottom of the page, it only takes me to the bottom edge of the div tag at the top of the page where I want to go. This happens to be the div tag that contains the other anchor text ("Bottom") that visitors need to be able to see. In Firefox, clicking the "Top" link at the bottom of the page takes you to the top of the page, where you can see the "Bottom" link text. In IE, clicking on the "Top" link at the bottom of the page does not quite take you to the top of the page (just to the bottom edge of the "Bottom" link), so you cannot see the text of the "Bottom" link at the top of the page. This is not acceptable, and is only a problem in IE. What can I do to address this problem?

I've attached a zip file to this post containing one of the web pages with these links.


----------



## JimmySeal (Sep 25, 2007)

The destination point of an intradocument link should be specified in the name= attribute of an <a> tag, not in the id= attribute of a div or any other element, as described in this page:

http://www.createafreewebsite.net/html_tutorial/anchor_tag_intra.html


----------

