Skip to content

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

@karthikb351

Description

@karthikb351

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions