I am having an issue with Bootstrap ScrollSpy in regards to the scrolling position of a selected element. The issue occurs at the bottom of the page, where I have two relatively short sections of content. When I either directly select the Projects section or scroll to it, the Education section will be highlighted instead of the Projects section. How would I offset/fix the scrolling position to select the correct section? I previously attempted to fix this by moving the anchor up into the previous section but only had limited success. The only other option I currently see is to restructure my content. Before I do that I would like to see if there are any other solutions, since I am encountering this exact issue on a second project.
The issue can be viewed here: http://beta.joshuabock.com/resume.html
Each of the sections is structured in the same way:
<section>
<h3>Projects</h3>
<p>Project Title</p>
<ul>
<li>Bullet Point</li>
<li>Bullet Point</li>
</ul>
</section>
Thanks in advance.
Ok I made it work. First of all
you have the same id for your nav and your ul. Remove it from your ul. Second try putting
To every one of your sections (just add a class, just to give them some space between). Last and most important remove
from your body tag. The default value is 10 and with the 30px of padding it will give it some space, so when you select a section it takes you to a space that belongs to the section that you selected. Maybe another value would be better, just play with it, until you have what you want. But overall this is what is causing your problems.
HTML
main.css