-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scroll to element should adjust for fixed top navbars height #7444
Comments
Duplicate of #4153, although the closing rationale there could use clarification; could be ripe for a revisit. |
Related, with some additional stabs at JS solutions: #1768 |
I believe the bootstrap home page handles this quite well, so how about adding support in? :-) |
A fix for this would be sweet. :) |
Unless this is bound to the scrollspy plugin, I see no reason to solve this particular problem with another plugin in Bootstrap. Add padding to the top of your linked sections, or write your own JS to adjust for the scroll. |
Reopening this for consideration in v3. |
nah not for v3 – it's not too hard though - stackoverflow |
This workd for me, you needed a timeout for this code to work. $(document).ready(function(){ |
I have a navbar-fixed-top navbar. Links that include "scroll to id" (as in href="#myid") don't adjust scroll position to account for the 50px of the navbar.
Can you add some JS to detect this situation on the URL and adjust the scroll position back by the height of the navbar?
The text was updated successfully, but these errors were encountered: