MediaWiki:Common.css
Jump to navigation
Jump to search
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* CSS placed here will be applied to all skins */
#toc {
position: fixed; /* This makes the TOC stay in place as the user scrolls */
right: 10px; /* Adjust distance from the right edge as needed */
top: 7em; /* Adjust distance from the top; this might need tweaking based on your header's height */
width: 250px; /* Or your preferred width */
background-color: #f9f9f9; /* A light background color */
border: 1px solid #aaa; /* A light border */
padding: 1em;
z-index: 100; /* Ensures it stays on top of other page content */
max-height: 70vh; /* Limits the height to 70% of the viewport height */
overflow-y: auto; /* Adds a scrollbar within the TOC if its content is too long */
}
/* Optional: Adjustments for the TOC title if needed */
#toc #toctitle {
text-align: center; /* Centers the "Contents" title */
margin-bottom: 0.5em;
}
/* Optional: Ensure the list within the TOC doesn't have excessive margins */
#toc ul {
margin-top: 0;
padding-left: 1.5em; /* Adjust list indentation if needed */
}