Check out this link to see the navigation with affix and scrollspy functionality as you scroll down (using bootstrap 3):
http://codepen.io/datanity/pen/thnua
Adding white space at the top causes the affix/scrollspy to trigger in the wrong location. For example, here is a demo with 800px of white space added:
http://codepen.io/datanity/pen/haKzg
The challenge is that I don't know in advance how much space will be at the top - sometimes it may be 2000px and other times only 300px. Additionally, I don't have control over the id/class of the divs that may appear on top, which can vary in number and identifiers.
Is there a way to make the affix and scrollspy functions trigger relative to the container they are in, rather than being fixed to a specific pixel location from the top of the body?
Any suggestions or solutions would be greatly appreciated!