Click to See Complete Forum and Search --> : named anchor not working


tcurrier
05-27-2006, 10:20 AM
I have a simple example of a named anchor that's not working for me :
Anyone have any ideas why ?

<p>
<a href="#C4">See Chapter 4</a>
</p>

<h2>Chapter 1</h2>
<p>This chapter ...</p>

<h2>Chapter 2</h2>
<p>This chapter ...</p>

<h2>Chapter 3</h2>
<p>This chapter ...</p>

<h2><a name="C4">Chapter 4</a></h2>
<p>This chapter ...</p>

pcthug
05-27-2006, 04:55 PM
That example would work, therefore this leads me to believe that there are either conflicting id's, anchor's, etc. in your page. Can you post your actual code?

tcurrier
05-27-2006, 07:22 PM
I think I misunderstood how named anchors worked. The chapter that I'm going to (4) in my example is on the same 'screen' that the link is on.

If I move chapter 4 to an area of the page that I have to scroll to, then clicking on the link takes me to chapter 4.

pcthug
05-28-2006, 12:53 AM
Yes, that is correct. So with the previous given example, Restore your browser window to a size where "Chapter 4" is not visible. Clicking on the top link should now scroll chapter 4 into focus.