Anchor link not working like I expect

Home Forums Gillion Theme Anchor link not working like I expect

Home Forums Gillion Theme Anchor link not working like I expect

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    RESOLVED Posts
  • dellgirl
    Participant

    Hi

    This is the first site I am making, and the first premium theme I use. For now I like it a lot. So far, I’ve been able to find solutions to everything I needed. Now, I’ve encountered a problem.
    I want to make an anchor link on one page to the heading on second page.
    I have set the ‘Row ID’ of the row containing that heading on second page to some ‘name’, and the link on the first page is url of the second page, plus ‘/#name’.
    The link is working, but it scrolls past the heading, like in the first attached image.
    I would like to scroll like in the second attached image, of course.
    It seams like sticky header overlaps heading.
    Without sticky header, it scrolls like in the third attached image, heading is under the WP top menu, which is also sticky. I suppose it would scroll correct without the WP menu, but I’m not  sure, because the site is still in maintenance mode. Also, I would like the header to be sticky.
    Is there any way I could fix this?

     

    Thanks in advance.

     

    Attachments:
    You must be logged in to view attached files.

    Hi @dellgirl,

     

    I hope you are well today and thank you for your question.

     

    Could you please share me the pages URLs from your site where it is not displaying correctly so that I can troubleshoot it?

     

    Best regards,
    Shufflehound team

    dellgirl
    Participant

    Ok,

    The URL is:

    https://igrastaklenihperlica.rs/moji-radovi/summer-daze-minduse

     

    and the link is on words:

    ‘Saznajte više o SuperDuo i MiniDuo perlicama.’

     

    Site is in maintenance mode, so I’ll give you admin log in details.

     

    You can try making it work by adding ID to the section displayed above the current section as shown in the attached screenshot.

    Attachments:
    You must be logged in to view attached files.

    dellgirl
    Participant

    Well, I will have a lot of links. It is not always possible to find a section having suitable size above the target.

    I decided to use this solution I found.

    I defined the class ‘sidro’ (means ‘anchor’):

     

    .sidro:before{
    display: block;
    height: 120px; /*same height as header*/
    margin-top: -120px; /*same height as header*/
    visibility: hidden;
    }

     

    Every target (row containing target heading) has ‘extra class’ = ‘sidro’.

    It is working great on the PC, but I’ll have to check that on smaller devices.

     

    It would be nice to have such an option in theme.

     

     

    Awesome great to see you got that achieved.

     

    We will consider this to be implemented in the future version of theme.

     

    Have a fantastic day!

    dellgirl
    Participant

    Thanks.

    Happy New Year!

    Wishing You Happy New Year..!!!

Viewing 8 posts - 1 through 8 (of 8 total)