Archived topic
Issue with anchor and sticky
19 replies · Started by Pascal on May 1, 2018
Hi David,
No, that's not it. I am just comparing the standard mobile hamburger menu (at the top of a mobile page) and the sticky navigation that replaces it when you start scrolling down. Sticky menu covers the content when it opens, standard mobile top menu pushes the content down when it opens. In relation to the anchor topic above, I navigate to anchors just fine from the middle of a page (sticky navigation) but I miss them by menu height when navigating from the top of the page (standard mobile menu).
I hope its clarifies.
David,
To complement my previous response with exact wording, GP interface mentions "static" and "sticky" navigations (where you can choose where a logo appears in Layout/Main navigation at the bottom). So on a mobile, with the hamburger versions of these menus, when you activate sticky navigation, the static menu is still the one used at the very top of the page. But they don't work exactly the same when it comes to opening and closing (covering or pushing down the content) which creates the issue with Elementor anchors (only with the static menu at the top of the page).
My question is then whether one of the following options is possible or can be considered in the future:
1) Enhance mobile static navigation to match sticky opening behavior (cover page content when opening).
2) Ability to remove mobile static navigation altogether and instead display sticky navigation at top of mobile page.
Thanks.
Ah ok. Just could just set the Sticky Navigation to desktop and use some CSS to permanently fix the navigation on mobile. Something like this:
@media (max-width: 768px) {
.main-navigation {
position: fixed;
top: 0px;
left: 0;
right: 0;
}
body {
margin-top: 50px;
}
}
Thanks, it works great for me and solves the issue navigating to Elementor anchors.
Glad to hear that!