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

CSS: Consider replacing position: sticky in .navbar--fixed-top #133

Open
xry111 opened this issue Jan 24, 2024 · 1 comment
Open

CSS: Consider replacing position: sticky in .navbar--fixed-top #133

xry111 opened this issue Jan 24, 2024 · 1 comment

Comments

@xry111
Copy link
Member

xry111 commented Jan 24, 2024

The problem with position:sticky is if using "#label" in URL to jump to a label, the actual position of the label will be covered up by the top bar.

FWIW: I found this issue when debugging a similar issue in LFS and BLFS books. We plan to do this change in our CSS for LFS and BLFS, maybe you can use it as a reference:

 div.navheader {
   border-bottom: 1px solid #dbddec;
-   position: sticky;
-   top: 0;
+  position: fixed;
+  top: 0;
+  left:0;
+  right:0;
+  bottom:auto;
+  height:7.3em
 }
@xry111
Copy link
Member Author

xry111 commented Jan 24, 2024

For example, when accessing https://areweloongyet.com/docs/contrib/natlang-style-guide#user-content-fnref-politics, the referred sentence is covered up. Strangely it does not happen if jumping to a title (like https://areweloongyet.com/docs/contrib/natlang-style-guide#%E7%AE%80%E8%80%8C%E8%A8%80%E4%B9%8B).

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