Aaron Li's Blog

Write it down before I forget

  Home  |   Contact  |   Syndication    |   Login
  30 Posts | 0 Stories | 21 Comments | 1 Trackbacks

News

Google

Archives

Other's Idea

Friday, January 25, 2008 #

Generally, the following code can lead the hyper link to a named anchor

<a name="aMyGoTo"></a>
<a href="#aMyGoTo">go to the defined point</a>

However, in IE, sometimes it seems the named anchor doesn't work. Here is the solution.

To replace
<a name="aMyGoTo"></a>
with
<span style="position:absolute;"><a id="aMyGoTo">&nbsp;</a></span>

In the case a div or other tag  with style sheet coming right after the <span>named anchor</span>, a more secure way is put a <div> tage outside of the span.  

<div><span style="position:absolute;"><a id="aMyGoTo">&nbsp;</a></span></div>