I have been searching for a resolution for my issue but haven't been able to find anything online or in this site that answers in simple terms how to fix this... apologies in advance for the long post, but trying to provide as much background context as possible.
I am a basic Sharepoint 2010 user, updating page content on a company site by using the Sharepoint 2010 tools, and adding some basic HTML coding to modify some of the functionality and formatting.
I don't have access to Sharepoint Designer, and have to be very careful what I do with the coding, so it has to be simple.
I have a "team site" page ( [Page 2] ), and have created some inter-page links from the top of the page to content anchor links further down the page with basic edited HTML code to make it work - I've had to do this because the "Bookmark" function is disabled. Noting that from what I can gather, the site page is a "wiki" page, so that seems to cause some additional limitations.
The inter-page links work, however, I then also wanted to link to those same anchor points from another site page ( [Page 1] ), and that's the problem.
The link from [Page 1] goes to [Page 2 / anchor link], but then immediately scrolls to the top of the page.
I haven't been able to find a simple HTML code that I can add to the Page 2 anchor link to stop it from doing this (ie go to my anchor link, and then stay there!)
This is the HTML coding for both the page-to-page links, and the inter-page links:
From one page to another link
Page 1 link - http://urlname.com/Page2.aspx#ANCHOR
Page 2 anchor link - <a id="ANCHOR" href="/Page2.aspx">ANCHOR</a>
Inter-page link
Page 2 link - <a title="ANCHOR" href="/Page2.aspx#ANCHOR">
(Link tools details - URL: /urlname/Page2.aspx#ANCHOR ; Description: ANCHOR ; Note: Bookmark option not available)
Page 2 anchor link - <a id="ANCHOR" href="/Page2.aspx">ANCHOR</a>
The link from Page 1 to Page 2 correctly goes to the page and anchor point, but then immediately goes to the top of the page. However the link from Page 2 to the anchor point on the same page works perfectly, and doesn't jump back up to the top.
From what I gather, there's some embedded page coding that causes it to do this, but I haven't been able to find anywhere the correct SIMPLE html coding to override).
Note: I do also have a couple of #TOP links on the page, but removing them doesn't make any difference to this.
I've tried all sorts of suggestions that I've found online to modify the anchor link HTML code to stop it from going back up to the top, but no luck - eg. I've tried different anchor names for the inter-page vs the page-to-page anchors, and I've tried adding #/ and other combinations to both the link and anchor link, but unless I'm doing it wrong, that hasn't worked either. I've also tried to put the anchor links within a Content Editor webpart but that also makes no difference.
6 hours later.... Any recommendations would be much appreciated, but please remember it needs to be basic and easy to follow :-) Thanks in advance!