In my rails application I’m trying to build a simple FAQ page that has a sidebar where when you click on a topic, it moves down to that question.
So a piece of my code in the sidebar looks like:
<li><a href="#work">How does it work?</a></li>
And then I have a matching h2 with the id=”work”.
It keeps overshooting when I test it out, I think because it’s showing the content starting at the very top of the page, which is hidden by the navbar in Bootstrap. What’s the best way to remedy this?
Had the same issue. Here’s what I came up with: