MediaWiki:Common.css

MediaWiki interface page
Revision as of 00:21, 18 May 2024 by Xenon (talk | contribs) (Created page with "→‎CSS placed here will be applied to all skins: →‎Set a maximum width for the entire content area and center it: .mw-body, .mw-body-content { max-width: 1200px; →‎Adjust the value as needed: margin: 0 auto; padding: 0 20px; } →‎Ensure the header and footer also follow the same width: #mw-head, #mw-head-base, #p-personal, .vector-menu-tabs, #footer { max-width: 1200px; →‎Adjust the value as needed: margin: 0 auto; padding: 0 20px;...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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 */

/* Set a maximum width for the entire content area and center it */
.mw-body, .mw-body-content {
    max-width: 1200px; /* Adjust the value as needed */
    margin: 0 auto;
    padding: 0 20px;
}

/* Ensure the header and footer also follow the same width */
#mw-head, #mw-head-base, #p-personal, .vector-menu-tabs, #footer {
    max-width: 1200px; /* Adjust the value as needed */
    margin: 0 auto;
    padding: 0 20px;
}

/* Adjust the position of the navigation block */
.mw-workspace-container, .mw-sidebar, .vector-menu-content, .vector-main-menu {
    max-width: 1200px; /* Adjust the value as needed */
    margin: 0 auto;
    padding: 0 20px;
}

/* Ensure responsiveness */
@media (max-width: 1200px) {
    .mw-body, .mw-body-content, #mw-head, #mw-head-base, #p-personal, .vector-menu-tabs, #footer, .mw-workspace-container, .mw-sidebar, .vector-menu-content, .vector-main-menu {
        max-width: 100%;
        padding: 0 10px;
    }
}