Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Anchors are not working as expected with sticky menu

  • I’m using elementor and I have a problem with anchors that are not jumping to the correct place since (I guess…) I’ve changed my menu height to 120px and I set it as sticky.

    When I try to use an anchor, the text that should be visible (eg:<h2 id="testimonials">heading for my anchor</h2>) stays hidden bellow the menu.

    I’ve tried to use IDs for anchors both way (<div id="testimonials">...</div>) and anchors (<a name="testimonials"></a>) and they are not working as expected…

  • Hi there,

    Elementor automatically adds its own Smooth Scroll function to the site.
    Which will be controlling the anchor position.
    In the past it was not possible to change that behaviour.
    Check with Elementor support, perhaps they have added a filter to adjust the offset position of there smooth scroll or added an option to disable it.

  • Hi Fernando,

    In my case, elementor don’t corrected this and I think that the cause was the custom logo size in my css (see the reference here).

    The problem is, once you select a custom logo size, all menu and sub-menu items will have the same size. If you don’t want that, you have to use custom css and that’s the reason why elementor not correct the problem automatically.

    What I did, since I have custom sizes and generatepress doesn’t have an option to select independent sizes for logo and sub-menu items, was to look for a fix…

    And… I did found a fix here.

    Isn’t this an issue to contemplate in generatepress core files?

  • Isn’t this an issue to contemplate in generatepress core files?

    Yes, we can not add this CSS to GP as most GP users do not use Elementor and this will be extra weight for their sites.

  • I have to look for a fix because:

    generatepress doesn’t have an option to select independent sizes for logo and sub-menu items…

    What I think generatepress team could do, is to add an option to have different sizes for those elements, since generatepress also have option to add a sticky menu to the sites.

    Am I wrong, or there’s something that I’m not seeing?

  • The issue only exists on the mobile header, if you are using the regular header, then you can control the logo size without affecting the menu item height 🙂

    But yes, what you said also makes sense, I’ll mark this as an improvement request for GP.

  • Great, Ying!

    Mobile headers are a must these days…

    Thanks. Have a nice day!

  • You are welcome 🙂

  • Hi,

    I’m still having a problem on this..

    Bellow I will leave the details, but the issue is that this solutions is overlaping other element on the page making a link un-clickable (both mobile and desktop).

    Please help!

  • I manage to solve this with z-index. Thanks!

  • Glad to hear that 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.