Skip to content

Jump to anchored tag hides section under navbar #420

@RobertZickler

Description

@RobertZickler

Description

If I jump to an anchored link, the section text will get covered by the navbar.

Steps to Reproduce

  1. Generate HTML output with ... trace -o html ...
  2. Click on an anchored tag. E.g. directly from the navbar or by adding the section text to the URL manually: result.html#req result.html#req~MY.REQ.001~1
  3. The selected section is now right below the navbar

Expected behavior

The section / headline should be not covered and below the navbar.

Solution

I had success with this answer: https://stackoverflow.com/a/69788943/16104038
So adding html { scroll-padding-top: 2.5em; } to the generated CSS solves that issue for all sections.

Environment

  • OFT: 4.0.1
  • OS: Windows 10
  • Java Version: 22

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

✅ Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions