MediaWiki:Common.css

From abbyversewiki.irkanien.de
Revision as of 18:29, 7 February 2025 by Abtacha (talk | contribs)
Jump to navigationJump 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.
/* Limit the width of the main content area and center the entire article content */
.mw-body-content {
    max-width: 800px; /* Adjust this as needed */
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px; /* Adds some spacing on the sides */
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative; /* Ensure proper positioning */
}

/* Ensure the article text itself is still left-aligned within the centered block */
.mw-parser-output {
    text-align: left;
    width: 100%;
}

/* Align the Table of Contents to the left, outside the article flow */
#toc {
    position: absolute;
    left: 0;
    top: 0;
    width: 250px;
    margin-right: 20px;
    background: #f9f9f9;
    padding: 15px;
    border: 1px solid #aaa;
}

/* Ensure floating elements (infoboxes, images, etc.) stay to the right, outside the article flow */
.floatright, .thumb, .infobox {
    position: absolute;
    right: 0;
    top: 0;
    width: 250px;
    margin-left: 20px;
}

/* Make sure tables don't get squeezed */
.wikitable {
    width: auto;
    max-width: 100%; /* Ensures tables don't break */
}