Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-14645

Anchors not visible (covered by page header)

    XMLWordPrintableJSON

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major - P3 Major - P3
    • None
    • None
    • None
    • None

    Description

      Try clicking on https://docs.mongodb.com/manual/reference/glossary/#std-term-accumulator. It should show "accumulator", but the page header covers it up.

      This CSS fixes it for me on Chrome:

      /* Page header is 64px + 45px = 109px. */
      * { scroll-padding-top: 109px; }  
      

      This Stack Overflow question suggests "scroll-margin-top", but that didn't work for me: https://stackoverflow.com/questions/4086107/fixed-page-header-overlaps-in-page-anchors

       


       

      Another small but nice improvement would be to bring back the yellow highlight:

      :target { background: #ff9; }
      

      This is especially helpful for anchors near the end of the page. If you try clicking either of these:

      The highlight makes it clear where you've landed, even though the page can't scroll any farther.

      Attachments

        Activity

          People

            Unassigned Unassigned
            david.percy@mongodb.com David Percy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              2 years, 30 weeks ago