Search code examples
csspython-sphinxrestructuredtext

Internal reference destinations obscured by navbar


I've been using internal references extensively in my Sphinx documentation to make it easier to navigate.

Although the references work fine, I've noticed that they don't take readers to the correct position on the destination page because it is obscured by the navbar.

After clicking on my :ref: to the chapter below:

enter image description here

After clicking on my :ref: to the chapter below with the navbar hidden:

enter image description here

As you can see, when the navbar is hidden, it takes readers to the correct position (with the header at the top of the page).

I'm using the Sphinx bootstrap theme but I've also noticed that this problem arises with the default theme. This is true even I remove my custom CSS.

Can anyone else reproduce this problem and does anyone know how to fix it?

Any help would be greatly appreciated!


Solution

  • This is an issue with Twitter Bootstrap-based themes and was reported in its issue tracker. There is no "best" or "easy" solution, because it depends on your preference.