Wikipedia: sticky table of contents
Pins the side table of contents so it stays visible while you scroll through a long article.
Code to copy
/* Keep the table of contents visible while scrolling */
.vector-toc,
#vector-toc {
position: sticky !important;
top: 1em !important;
max-height: calc(100vh - 2em) !important;
overflow-y: auto !important;
}
How to use this example
- Copy the code with the button above.
- Install JustZix (2 minutes) and open the extension on the target page.
- Add a new rule matching that page.
- Paste the code into the rule's CSS panel and save — the effect appears instantly.
Rate this example
No ratings yet — be the first.