We are trying to fix the navbar of the page to the top of the viewport as soon as the scroll reaches it, and also, to prevent it from going over the footer. We are trying to do it via affix (Bootstrap plugin) but it doesn't seem to sort any effect. Can you give some advice?
Here's the html of the sidebar:
<div id="sidebar-wrapper" class="affix-top" data-spy="affix-top" data-offset-top="250">
<nav id="spy">
<ul class="sidebar-nav nav">
<li>
<a href="#anchA" data-scroll>
<span class="fa fa-anchor solo selected">A</span>
</a>
</li>
<!--
… <li> elements for letters A-to-Z here
-->
</ul>
</nav>
</div>
The page is available here: https://jsfiddle.net/br6n0hma/
If I get your requirements right, you fill find the example below useful. Without all the fancy things, it shows a possible core structure of your layout.
Couple of notes:
#wrappergot a.d-flexclass, so it is easier to position/size the sidebar and the content divs..sticky-topon#spy..page-contentnode was extended with the.container-fluidclass to properly wrap.rowelements.<body>itself. This allows to remove a part of your javascript. (This requires the.nav-linkclasses on the links in the sidebar.)