We added an affixed Sidebar Menu in NixMash Spring as you can see below. You can view it in action on the demo site .
I searched my blog thinking I posted on this topic years ago but apparently never did. So here’s the post that will save me time the NEXT time I need to add affixed sidebar content in Bootstrap.
We’ll start with the sidebar menu HTML within a Thymeleaf fragment. You’ll notice the “sidebar” fragment takes an activeTab parameter. This is passed from the respective Posts page to add an active CSS element to the menu link.
Here we’re passing the activeTab from the Recent Posts page when adding the Thymeleaf Sidebar Fragment.
We’ll next get the pertinent CSS out of the way next.
And with that your sidebar menu or other content will stop at 100px from the top of the left column!