Difference between revisions of "MediaWiki:Common.css"

From Block library
Jump to: navigation, search
Line 2: Line 2:
 
body.page-Main_Page.action-view h1.firstHeading, body.page-Main_Page.action-submit h1.firstHeading { display: none; }
 
body.page-Main_Page.action-view h1.firstHeading, body.page-Main_Page.action-submit h1.firstHeading { display: none; }
  
<div class="Blockbox">
+
.infobox {
<div class="Blockbox-title">{{{title|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}|
+
    background: #eee;
<div class="Blockbox-image">[[File:{{{image}}}|300px]]</div>}}
+
    border: 1px solid #aaa;
<table>{{#if:{{{param1|}}}|<tr>
+
    float: right;
     <th>Parameter 1</th>
+
    margin: 0 0 1em 1em;
     <td>{{{param1}}}</td>
+
     padding: 1em;
</tr>}}{{#if:{{{param2|}}}|<tr>
+
     width: 400px;
     <th>Parameter 2</th>
+
}
    <td>{{{param2}}}</td>
+
.infobox-title {
</tr>}}{{#if:{{{param3|}}}|<tr>
+
    font-size: 2em;
    <th>Parameter 3</th>
+
     text-align: center;
     <td>{{{param3}}}</td>
+
}
</tr>}}{{#if:{{{param4|}}}|<tr>
+
.infobox-image {
     <th>Parameter 4</th>
+
    text-align: center;
    <td>{{{param4}}}</td>
+
}
</tr>}}{{#if:{{{param5|}}}|<tr>
+
.infobox th {
     <th>Parameter 5</th>
+
     text-align: right;
    <td>{{{param5}}}</td>
+
    vertical-align: top;
</tr>}}</table>
+
     width: 120px;
</div>
+
}
 +
.infobox td {
 +
     vertical-align: top;
 +
}

Revision as of 17:09, 29 August 2018

/* CSS placed here will be applied to all skins */
body.page-Main_Page.action-view h1.firstHeading, body.page-Main_Page.action-submit h1.firstHeading { display: none; }

.infobox {
    background: #eee;
    border: 1px solid #aaa;
    float: right;
    margin: 0 0 1em 1em;
    padding: 1em;
    width: 400px;
}
.infobox-title {
    font-size: 2em;
    text-align: center;
}
.infobox-image {
    text-align: center;
}
.infobox th {
    text-align: right;
    vertical-align: top;
    width: 120px;
}
.infobox td {
    vertical-align: top;
}