[Support request] easy table of contents primary menu overlaps headline & first lines of text

Home Forums Support [Support request] easy table of contents primary menu overlaps headline & first lines of text

Home Forums Support easy table of contents primary menu overlaps headline & first lines of text

  • This topic has 9 replies, 3 voices, and was last updated 3 years ago by David.
Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1681529
    Karsten

    Hi,

    we use easy table of contents for our website. If you click on the ToC, you get right to the point.
    But you don’t see the headline and the first 2-3 lines of text, because the primary menu overlaps it. Users currently need to scroll up a bit, if they want to start reading at the desired point.

    Is there an easy way, which solves this tiny problem?

    Thanks and Cheers

    #1681649
    David
    Staff
    Customer Support

    Hi there,

    I assume you’re using the Sticky Navigation setting… if so do the following:

    1. Customizer > General and enable the Smooth Scroll function.
    2. Add the PHP Snippet provided in this article, to make all links smooth-scroll:

    https://docs.generatepress.com/article/generate_smooth_scroll_elements/

    Smooth scroll automatically adjusts the scroll position to consider the sticky nav.

    #1684808
    Karsten

    Thank you David for your quick support.

    Yes, we are using Sticky Navigation setting.

    Unfortunately the sticky nav still covers the blog headlines.

    I have enabled Smooth Scroll function.

    I have added the php snippet.

    Please check and advise.

    Thank you

    #1684995
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can link us to the site in question?

    You can use the private information field.

    Let me know 🙂

    #1685888
    Karsten

    Hi Leo, credentials are added:

    #1686473
    David
    Staff
    Customer Support

    Are these links on the same page ?

    #1686782
    Karsten

    Hi David, I don’t know what links you are refering to.

    But now it looks quite good. The ToC jumps to the headline. I would like to see a little bit more margin to the stick navigation if possible.

    Thank you

    #1686855
    David
    Staff
    Customer Support

    Tricky one – you could try adding this CSS to create a fake space above each of the section titles:

    .ez-toc-section {
        display: block;
        padding-top: 40px;
        margin-top: -40px;
    }
    #1691622
    Karsten

    Thank you, David.

    Very helpful!

    #1692250
    David
    Staff
    Customer Support

    You’re welcome

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