Template:Infobox
Template page
More actions
This is a generic infobox template. It creates a right-aligned table with alternating labels and data.
How it works
This template uses pairs of parameters, like `label2` and `data2`, to create rows. A `header` parameter creates a full-width header row. The `` parser function ensures that a row is only created if its corresponding parameter (e.g., `label2` or `header1`) is given a value.
CSS Styles
For this template to display correctly, you may need to add the following styles to your wiki's common CSS file (e.g., MediaWiki:Common.css):
.infobox {
border: 1px solid #aaa;
background-color: #f9f9f9;
color: black;
margin: 0.5em 0 0.5em 1em;
padding: 0.2em;
float: right;
clear: right;
}
.infobox-title {
font-size: 125%;
font-weight: bold;
text-align: center;
}
.infobox-header {
background-color: #e0e0e0;
text-align: center;
}
.infobox-label {
font-weight: bold;
text-align: left;
vertical-align: top;
padding-right: 0.65em;
}
.infobox-data {
vertical-align: top;
}