-
-
Notifications
You must be signed in to change notification settings - Fork 230
Fix: prevent section headings from being hidden behind sticky navbar #427
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
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for stupendous-kringle-a86e81 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| /* FIX: Add scroll padding to account for fixed navbar */ | ||
| html { | ||
| scroll-behavior: smooth; | ||
| scroll-padding-top: 100px; /* Adjust based on navbar height + some spacing */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please change this to 120px and remove the comments?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok , i will
| <a class="navbar-brand fw-bold" href="#"> | ||
| <img src="_static/images/logo-dark.png" alt="DISCOVER Cookbook" height="75" class="me-2 theme-logo dark-logo"> | ||
| <img src="_static/images/logo-light.png" alt="DISCOVER Cookbook" height="75" class="me-2 theme-logo light-logo d-none"> | ||
| <img src="/DISCOVER/_static/images/logo-dark.png" alt="DISCOVER Cookbook" height="75" class="me-2 theme-logo dark-logo"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you please undo this change?
|
Can we please include this snippet at the end (under the <script> section) to fix the navbar auto-close issue? |
Summary
Fixed an issue where clicking internal navbar anchors (About, Versions, Contribute)
caused the section titles to appear hidden behind the sticky navbar.
Changes
scroll-padding-top: 100px;
How I tested
python -m http.serverlocally.Screenshots
Before -

After -

Fixes #426