Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
id info
Template documentation (for the above template, sometimes hidden or invisible) [view] [edit] [history] [refresh]

Template:Documentation header

This template can be used to quickly create a userbox for display on a user's user page without having to know HTML or Wikitable syntax.

For a list of userboxes, see Minecraft Wiki:Userboxes.

Params

"id" refers to the first cell of the userbox. "info" refers to the second cell of the userbox. The "id" is usually a icon or name, and the "info" is usually a short statement describing what the userbox is or means. The resulting userbox is a table.

Param Description
Template:P Adds an HTML class attribute to the userbox (which is an HTML table; the class is added to thetable element), to allow for styling, emission of microformats, etc.
Template:P what type of float to use. Can be Template:Cd (default = left).
Template:P border color (default = Template:P)
Template:P border width in pixels (default = 1)
Template:P id image and/or text
Template:P id horizontal alignment. Can be Template:Cd (default = center).
Template:P id background color (default = #d0d0d0)
Template:P id font color (default = black)
Template:P id text size in px (default = 14)
Template:P id cell padding (default = 0 1px 0 0)
Template:P id line height (default = 1.25em)
Template:P id other CSS parameters
Template:P id box width in pixels (default = 45)
Template:P id box height in pixels (default = 45)
Template:P Adds an HTML class attribute to the "info" HTML table-row, to allow for styling, emission of microformats, etc.
Template:P info text and/or image
Template:P info horizontal alignment left/center/right/justify (default = left)
Template:P info background color (default = #e0e0e0)
Template:P info font color (default = black)
Template:P info text size in points (default = 8)
Template:P info padding (default = 0 4px 0 4px)
Template:P info line height (default = 1.25em)
Template:P info other CSS parameters
Template:P if specified, this will prevent the user box from being added to Category:Userboxes; otherwise, it will be added;
Template:P user category (optional)
Template:P 2nd user category (optional)
Template:P 3rd user category (optional)

Usage

  • All parameters are optional
  • Images should normally be scaled to x45px or less. See mw:Help:Images.

Most userboxes use only a handful of the parameters. The following subset can be used to quickly convert an HTML userbox into the format used here:

<syntaxhighlight lang="wikitext"> Template:Userbox </syntaxhighlight>

Examples

Code Result
<syntaxhighlight lang="wikitext">Template:Userbox</syntaxhighlight> Template:Userbox
<syntaxhighlight lang="wikitext">Template:Userbox</syntaxhighlight> Template:Userbox
Below example shows the default appearance of a userbox, which is (much) higher than the 45px. Compare the height of the one below with the above userbox.
<syntaxhighlight lang="wikitext">Template:Userbox</syntaxhighlight> Template:Userbox
Below example shows how we can change that userbox and further specify parameters to bring down the overall height of the userbox to the recommended height of 45px, even with four text lines. Cell padding parameter "info-p" can also be set at "1pt 1pt 1pt 2pt", or "1pt 2pt" for better appearance, when there are 4 text lines.
<syntaxhighlight lang="wikitext">Template:Userbox</syntaxhighlight> Template:Userbox
Below example is for advanced users, showing how we can specify other CSS properties, for example, "font-family", to change the font or "text-align" to change the alignment from the default parameters. At below, on the right side are two userboxes: top one is displayed without the "font-family" or "text-align" parameters; and the bottom userbox is displayed by using the below codes, with the help of the "info-op" field.
<syntaxhighlight lang="wikitext">Template:Userbox</syntaxhighlight> Template:Userbox

Template:Userbox

Microformats

bodyclass
This parameter is inserted into the "class" attribute for the userbox as a whole.
info-class
This parameter is inserted into the "class" attribute for the info component.

This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a userbox as containing hCard information about a person, for example, add the following parameter:

<syntaxhighlight lang="wikitext"> | bodyclass = vcard </syntaxhighlight>

or

<syntaxhighlight lang="wikitext"> | info-class = vcard </syntaxhighlight>

then (for example):

<syntaxhighlight lang="wikitext"> | title = ...the books of Iain Banks </syntaxhighlight>

...and so forth.

de:Vorlage:Babelbox es:Plantilla:Userbox fr:Modèle:Boîte utilisateur ja:テンプレート:Userbox ko:틀:유저박스 lzh:模板:Userbox nl:Sjabloon:Userbox pt:Predefinição:Userbox ru:Шаблон:Userbox th:แม่แบบ:Userbox uk:Шаблон:Юзербокс

zh:Template:Userbox
The above text is transcluded from Template:MC/Userbox/doc; you can change it or view its history.
If you're done making changes, please refresh the text.
Please add categories and interwikis to Template:MC/Userbox/doc. (View all subpages of this page.)