Prinzhorn / skrollr-menu

skrollr plugin for hash navigation
MIT License
285 stars 143 forks source link

Scrolling to #id while passing though a div with % fluid height. #35

Closed clintrobinson closed 10 years ago

clintrobinson commented 10 years ago

I'm having 2 issues on my website http://clintrobinson.net. First is the nav bar linking to content sections while the scroll position at the top. It won't scroll to the correct offset. Is this because of the changing height on the .feature div??

Secondly, The scrolling will not scroll the whole page on a mobile. I am confused as to whether the non skrollr content is to be in the #skrollr-body div or outside of it. I am also not positive that is the problem, as I have had it both was but cannot make it work.

Any help would be appreciated. Thank you.

Prinzhorn commented 10 years ago

Is this because of the changing height on the .feature div?

Yes.

I am confused as to whether the non skrollr content is to be in the #skrollr-body div or outside of it

https://github.com/Prinzhorn/skrollr#what-you-need-in-order-to-support-mobile-browsers

Everything that should be scrollable needs to be inside of the skrollr-body. Also you should make it a separate wrapper element and not put any keyframes on it.

clintrobinson commented 10 years ago

You're the best. Thank you.