Scrolling in Cornerstone with fixed nav bar

Hi,

I’m using the most recent theme X with Cornerstone plugin on my One-Pager website and I have a fixed header nav bar configured whose menu entries shall scroll to the related sections of the page. Because of the fixed nav bar, the scroll positions are not correct, so the browser always scrolls a bit to much because the fixed nav bar hides some space of the section. Is there an easy fix for that?

https://www.freikirche-moeckmuehl.de/#medien

With best regards, Rainer

Hello Rainer,

Thanks for writing to us.

Please add the following code to the Theme Options > JS and check if that resolves your issue.

window.csGlobal.csHooks.filter('hash_scrolling_offset', (offset) => {
return offset - 90;
} );

It’s due to the offset calculation while using the **Sticky ** and the One Page navigation. So, it needs to be adjusted using that JavaScript code. It has been already reported to our tracker for further investigation by our development team.

Hope it helps.
Thanks

1 Like

Hi @prakash_s,

I had to change the offset value to -85, but then it worked perfectly. Thanks for the quick reply!

With best regards, Rainer

Hello Rainer,

Glad that we were able to help you. Please feel free to open a new thread if you have any more concerns.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.