document linking

B

bill yeager

I'd like to link to another part of my document within my
aspx page.

I have the following code in my HTML:

<code>
<A HREF="#PositionsHeld">Positions Held</A>

<asp:label id="lblPosition" style="Z-INDEX: 107; LEFT:
16px; POSITION: absolute; TOP: 816px"
runat="server" Font-
Underline="True" Font-Bold="True" Font-
Size="Larger">Positions Held</asp:label>

<H2 id="PositionsHeld"></H2>
</code>

I would like the link to go directly right after the
above label. I thought I would be achieving this by using
the "<H2 id="PositionsHeld"></H2>" . When I click on the
link, it brings me down some on the document, but nowhere
near this label.

What am I doing wrong?
 
K

Ken Cox [Microsoft MVP]

Hi Bill,

Maybe you want to try the other syntax for the anchor?

<a href="#PositionsHeld" target=_self >Positions Held</a>

<H2><A name="PositionsHeld">Info here</A></H2>
 
B

bill yeager

Ken, I tried it, but it still doesn't scroll to the
destination anchor tag...
 

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,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top