Site logo

[Support request] Internal Link

Home Forums Support [Support request] Internal Link

Home Forums Support Internal Link

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1854430
    afuente26

    Hello again,

    I have a recurrent issue.

    When I insert an internal link in the menu, to another point inside the page, the link brings me to the point I need, but the menu is above.

    Any idea?

    Thanks
    Angel

    #1854474
    Leo
    Staff
    Customer Support
    #1854993
    afuente26

    Thanks a lot. The video is very good explained.

    I´ve done already what the video says, but I have still the same problem.

    First, I have to add

    html {
    scroll-behavior: smooth !important;
    }

    to the css, otherwise, it doesn´t work. Ok. Thanks not really bad.

    Second, and this is what I don´t like, is that the linked text (or whatever) stays UNDER the menu, not behind it.

    You can try yourself to see what I meen…

    Thanks again..
    Angel

    #1856110
    Elvin
    Staff
    Customer Support

    Hi there,

    For this, I believe it’s either you do the padding+margin trick on the destination element or,

    use a script that allows you to add offset to the anchors.

    You can try the jQuery script provided here – https://generatepress.com/forums/topic/anchor-links-load-behind-sticky-header/#post-991786 – and play around with the offset value.

    #1856351
    afuente26

    Thanks a lot Elvin,

    finally, I´ve found an easy and quick solution, that I want to share.

    :target:before {
    content: “”;
    display: block;
    height: 100px;
    margin: -100px 0 0;
    }


    @media
    (max-width: 768px) {
    :target:before {
    content: “”;
    display: block;
    height: 60px;
    margin: -50px 0 0;
    }
    }

    Thanks a lot again. I´m really glad with your template and your support.

    Greetings
    Angel

    #1856383
    Elvin
    Staff
    Customer Support

    Nice one! Thanks for sharing. Glad you got it sorted. 😀

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