Jump to content

MediaWiki:Common.css: Difference between revisions

From bestpressey
Add Wikipedia-style infobox CSS
 
Restore Wikipedia-style infobox CSS
 
(2 intermediate revisions by the same user not shown)
Line 34: Line 34:
}
}


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


/* Titles */
.infobox-above,
.infobox-above,
.infobox-title {
.infobox-title {
Line 54: Line 52:
}
}


/* Section headers */
.infobox-header {
.infobox-header {
     text-align: left;
     text-align: left;
Line 62: Line 59:
}
}


/* Labels and data */
.infobox-label {
.infobox-label {
     text-align: left;
     text-align: left;
Line 80: Line 76:
}
}


/* Nested infoboxes */
.infobox-subbox {
.infobox-subbox {
     padding: 0;
     padding: 0;

Latest revision as of 21:17, 5 October 2026

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

.infobox-image {
    text-align: center;
}

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

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

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

.infobox-label {
    text-align: left;
    font-weight: bold;
}

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

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

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

.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;
}