Jump to content

MediaWiki:Common.css

From bestpressey
Revision as of 20:55, 5 October 2026 by TemplateBot (talk | contribs) (Add Wikipedia-style infobox CSS)
(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)
  • Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5.
/* Wikipedia-style infobox base styling */

.infobox {
    border: 1px solid #a2a9b1;
    border-spacing: 3px;
    background-color: #f8f9fa;
    color: #202122;
    margin: 0.5em 0 0.5em 1em;
    padding: 0.2em;
    width: 22em;
    font-size: 88%;
    line-height: 1.5em;
    clear: right;
}

.infobox > caption {
    font-size: 125%;
    font-weight: bold;
    padding: 0.2em;
}

.infobox > tbody > tr > th,
.infobox > tbody > tr > td {
    padding: 0.2em;
    vertical-align: top;
}

.infobox > tbody > tr > th {
    text-align: left;
}

.infobox > tbody > tr > td {
    text-align: left;
}

/* Center infobox images */
.infobox-image {
    text-align: center;
}

.infobox-image img {
    max-width: 100%;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

/* Titles */
.infobox-above,
.infobox-title {
    text-align: center;
    font-size: 125%;
    font-weight: bold;
}

/* Section headers */
.infobox-header {
    text-align: left;
    font-size: 110%;
    font-weight: bold;
    background-color: #eaecf0;
}

/* Labels and data */
.infobox-label {
    text-align: left;
    font-weight: bold;
}

.infobox-data {
    text-align: left;
}

.infobox-full-data {
    text-align: center;
}

.infobox-below {
    font-size: 90%;
}

/* Nested infoboxes */
.infobox-subbox {
    padding: 0;
    border: none;
    margin: -3px;
    width: auto;
    min-width: 100%;
    font-size: 100%;
    clear: none;
    float: none;
    background-color: transparent;
}

.infobox-subbox .infobox-image,
.infobox-subbox .infobox-full-data {
    text-align: center;
}