Hello community, i hope you all are very well.
Please, I would like to request a help with this:
My manager is requesting me to make the SharePoint navbar "sticky" to persist when you scroll down the page. This page has a custom css and i don't have too much skills to understand all the codes but i can somehow try.
Current view for the menu is this:
Following https://www.w3schools.com/howto/howto_js_navbar_sticky.asp i have created a .js file and .css file (but i added to the core css to avoid using another file), i see the css is applying when i check with Chrome developer mode and also see in the sources the .js being called. I added in the masterpage the code to call the .js file above <div id="s4-workspace">, the CSS is already being call from an acsx file if i am right that's why i edited the core css file adding the sticky css so the JS can add or remove the class when user scrolls the page.
JS script call in the master page HTML:
The problem is, when i force to apply in the id=NavBar or class=aed-navegation i see the bar becomes sticky but with some problems so i need the JS to be applied but is not working...
If i apply the css directly without being call with JS, this happens:
|---
Adding TOP:177px instead of "0px" seems to fit better but the bar and sub terms are covered by the content:
Here you can see, i have added the ID and class to the navigation section in the Master page HTML:
Find attached CSS, JS scripts:
191393-stickynavbarcss.txt | 191401-stickynavbarjs.txt
I hope someone can help me with this,i really want to learn and complete this challenge.
Thanks in advance.
Best regards,
LC.