Skip to content
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

Direct links to sections hide their title behind the fixed navbar #2093

Open
karthikb351 opened this issue Jul 8, 2024 · 0 comments
Open

Comments

@karthikb351
Copy link
Contributor

karthikb351 commented Jul 8, 2024

Bug Report

hasgeek-section-anchor.mp4

When linking to a specific section via # fragments in the url, (like the Membership section for the "Become a Member" CTA), the header is hidden since by default the browser will have the element at the top of the viewport, unaware of the fixed header or other content that could hide it.

Potential solution

There is a scroll-padding-top property in CSS that was designed to address this problem, which indicates to the browser that when scrolling there should be a padding consider. This is usually set to be equal to the height of the fixed header.

Reference: https://developer.mozilla.org/en-US/docs/Web/CSS/scroll-padding-top

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant