Black Friday sale! Get up to 25% off GP Premium! Learn more ➝

[Support request] Fixed menu and jump into content problem

Home Forums Support [Support request] Fixed menu and jump into content problem

Home Forums Support Fixed menu and jump into content problem

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1122232
    Nikola

    Please look into the example page (my website). I used fixed menu and I have links in the “Contents” section that jump into the page.
    But the problem is that Title of that section got hidden behind the menu.

    I found online people talking about that problem – https://stackoverflow.com/questions/4086107/fixed-page-header-overlaps-in-page-anchors

    I did try to add this CSS:

    h2:before, h3:before{
     padding-top: 140px; margin-top: -140px;
    	display: block;
      content: "";
    }

    In Additional CSS.

    But it didn’t work.

    I removed that CSS now from “Additional CSS”.

    Do you have any idea how to fix this?

    #1122235
    Leo
    Staff
    Customer Support

    Hi there,

    I would recommend using our smooth scroll script:
    https://docs.generatepress.com/article/smooth-scroll/

    This option is also integrated with the sticky navigation, so the top of your anchor point isn’t hidden.

    Let me know if this helps 🙂

    #1122236
    Nikola

    I did activate that option – but I still see the same problem.

    #1122244
    Leo
    Staff
    Customer Support

    Which menu item are you referring to?

    Make sure you add the correct class according to the article linked above and not just activate the option in the customizer.

    #1122249
    Nikola

    Ah I see now that I need to add class=”smooth-scroll” to all titles.
    Is there some easy way to add class=”smooth-scroll” to all H3 tags in website?
    Imagine that I have 1000 pages and each has many sections.

    #1122263
    Leo
    Staff
    Customer Support

    Unfortunately I don’t believe so.

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