MediaWiki:Common.css: Difference between revisions

From Center for Cognitive Neuroscience
Jump to navigation Jump to search
(Created page with "→‎CSS placed here will be applied to all skins: #toc { position: fixed; right: 0; top: 7em; →‎Adjust as needed; 5em might be header height, 6em just under: →‎bottom: 5em;: →‎Alternative bottom positioning: z-index: 10000; →‎Ensures it floats above other content: background-color: rgb(249, 249, 249); →‎Fallback background color: background-color: rgba(249, 249, 249, 0.9); →‎Background with opacity: /* Higher opacity (last argument) me...")
 
No edit summary
Tag: Reverted
Line 2: Line 2:


#toc {
#toc {
   position: fixed;
   position: static;
   right: 0;
   right: 0;
   top: 7em; /* Adjust as needed; 5em might be header height, 6em just under */
   top: 7em; /* Adjust as needed; 5em might be header height, 6em just under */

Revision as of 16:20, 20 May 2025

/* CSS placed here will be applied to all skins */

#toc {
  position: static;
  right: 0;
  top: 7em; /* Adjust as needed; 5em might be header height, 6em just under */
  /* bottom: 5em; */ /* Alternative bottom positioning */
  z-index: 10000; /* Ensures it floats above other content */
  background-color: rgb(249, 249, 249); /* Fallback background color */
  background-color: rgba(249, 249, 249, 0.9); /* Background with opacity */
  /* Higher opacity (last argument) means less transparency */
  padding: 1em; /* Add some padding around the TOC content */
  border: 1px solid #aaa; /* Optional border */
  max-width: 300px; /* Optional: constrain the width */
}

/* Ensure the TOC height doesn't take over the screen; adjust max-height as needed */
#toc > ul {
  max-height: 350px; /* Or a percentage like 70vh */
  overflow-y: auto; /* Add scrollbar if content exceeds max-height */
}

/* Optional: Style for the show/hide toggle if it's part of your TOC structure */
.toctoggle {
  float: right; /* Or adjust as needed */
}