• I’m sorry if this is in the wrong place, I’m a new user and this is my first post/topic. Please feel free to move it if necessary and any feedback about the use of this site is welcome.

    I’m having trouble with HTML anchors between sub menus and sections of one page.

    When I click on the sub menu, it does initially jump to the correct point on the page but then it jumps further down the page to the wrong bit. I’ve checked the html code (I’m not by any stretch of the imagination a programmer, I can only recognise and work with the basics) but it seems to look correct and seems identical to the first two sub menus/anchors which do work. I think everything is labelled correctly between menus, anchors and pages so I’m at a loss as to where it is going wrong.

    Could it be a bug with wordpress or the new block system?

    Has anyone experienced anything the same or similar?

    Any help or advice would be amazing. Thank you in advance ??

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • You should ask in your theme’s support forum, since the theme outputs the menu and could have a script for additional functionality. That might be interfering with the normal thing the browser does when jumping to an anchor.

    hi @snowmane2209 , i’ve checked the page, but can’t seem to see the issue.
    can you send a screenshot of the problem you experience, so i can have a better understanding

    All of the submenu items repositioned the page to the right spots in Chrome for me. What specific submenu item seems to be causing the problem?

    One suggestion: add a slash before the pound sign in the submenu link. For example, instead of using this address:
    https://jessicaeade.com/employment#bdo_darts
    use this address:
    https://jessicaeade.com/employment/#bdo_darts

    That way the browser won’t reload the page, it will just jump to the right spot.

    Thread Starter snowmane2209

    (@snowmane2209)

    Thank you all for your responses, it’s much appreciated!

    I experimented with different browsers and operating systems across different logins with mixed results. Some worked as I wanted, but some still jumped.

    Thank you so much CrouchingBruin for your suggestion of adding a forward slash to the custom links, that is absolutely so much better! Unfortunately though it still seems to be very hit and miss as to whether the page stays in the correct place once the sub menu has been selected. The problematic submenus are bt sport, bdo darts, prized apart, and strebel. In particular at the moment; bdo darts seems to be jumping to bt sport.

    Hi Joy, do you know where I can find a link to the sydney theme help forum? I searched for it, and might have found it but couldn’t see an option to create a new post.

    Not sure how to add a screenshot here Code Explorer but here it is on my website https://www.jessicaeade.com/html-anchors-jumping-help/. This was the result when I clicked on Strebel. Admittedly part of the section is obscured by the black bar that is present when one is logged into wordpress but I think it’s still jumping to halfway through an incorrect menu after first jumping to the correct one. Another description would be that it jumps twice even though I only click once (if that’s any help :/ )

    The forum is https://www.ads-software.com/support/theme/sydney and the bottom of that page has the place to type your question.
    I can’t tell anything from your link.

    OK, I think I see the problem. Your anchors should be given an ID value instead of a name value.

    Change this:
    <a name="bdo_darts"></a>
    to this:
    <a id="bdo_darts"></a>

    One interesting thing that I’ve noticed, too, is that on Firefox, the menu gets fixed at the top when scrolling down the page, but in Chrome, it doesn’t.

    It looks like the issue has been fixed? If so, can you please mark this as Resolved so others will know? Thanks.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘HTML Anchors Jumping’ is closed to new replies.