Site logo

Archived topic

Mobile Menu for one Pager does not work

9 replies · Started by itcwiz on November 7, 2018

Viewing posts 1–10 of 10

I have this test site start1.undercover-in-kuesnacht.ch where I have a one pager and defined Anchors for the Page Sections. On the desktop the menu works, on the mobile, the anchors, for example start1.undercover-in-kuesnacht.ch/#marken does not work, this means the click on the menu item does not jump to the right spot on the page. Can you help me, what is it wrong?

This will be fixed in GP 2.2/GPP 1.7.4.

For now, try this:

.main-navigation.toggled .main-nav > ul {
    position: absolute;
    left: 0;
    right: 0;
    background: #fff;
    z-index: 1;
}

Hi Tom!

Thank you so much for your answer. It is a bit better, but not good. This means, when I click on the mobile on some menu items, the first one is wrong (the position is about 5 cm lower then it should be) but then the more I click, the better the position will get. Do you have maybe another solution for me? This means, the way I implemented this anchor is by defining a text element in front of the page section with the anchor definition . Do you know a better solution which would work well on such an one pager? It would be also very nice if I had a nice solution for the menu on desktop, if I scroll down the page that the sticky menu shows me the section in which I am .... This would be fantastic.... But the first priority is to solve this jump issue on mobile and tablet.... Thank ypu a lot for your answer!

You can try using our smooth scroll option: https://docs.generatepress.com/article/smooth-scroll/

It will make it so the sticky nav doesn't sit on top of the section you linked to.

That being said, this is a bug currently. We'll be releasing 1.7.4 very soon in anticipation of GP 2.2, which should have this fixed completely.

Thank you Tom but it does not work at all. What do I do now? I wanted to launch this site but now I cannot. How long do you think I have to wait for the fix? Thank you and regards,Ruxandra

Add the smooth-scroll class to the links that link to the anchors, instead of the anchors themselves.

If that doesn't help, shoot me an email (https://generatepress.com/contact) and I'll send you the latest beta versions to test :)

Hi Tom!

I added this smooth-scroll class and I have to tell the following:
- if I set in the Layout->Primary Navigation->Navigation Location on "Below Header" then it works well for the mobile but for the desktop the position is bad
- if I set in the Layout->Primary Navigation->Navigation Location on "above Header" then it works very good for the desktop, but again a very wrong position for the mobile.

You don't have any other ideas? I will write you on https://generatepress.com/contact, but I really wanted not to launch this site with bugs ....

Thank you,
Ruxandra

Beta sent :)

Thank you Tom, solved my Problem! Hope not to get other bugs ....

Great to hear! :)

This archived topic is closed to new replies.