Site logo

Archived topic

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

9 replies · Started by Karsten on March 4, 2021

Viewing posts 1–10 of 10

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

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.

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

Hi there,

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

You can use the private information field.

Let me know :)

Hi Leo, credentials are added:

Are these links on the same page ?

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

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;
}

Thank you, David.

Very helpful!

You're welcome

This archived topic is closed to new replies.