User:AndreasBlixt/Sandbox/Infobox template

This template is used for greatly simplifying the creation of infoboxes. The user may define background and border colors, some general values (such as title, image, etc) and up to 20 field name/field value sets. See the |talk page for examples.

Parameters
All parameters are optional, and the template could be called simply as. However, in most (if not all) cases, the user will want to specify at least a few parameters.


 * background
 * The color of the background. Defaults to #f9f9f9 if omitted.


 * border
 * The color of the border. Defaults to #aaa if omitted.


 * float
 * How the infobox should float relative to the content. Values that can be used are left, right and none. Defaults to right if omitted.


 * title
 * The title of the infobox. Hidden if omitted.


 * image
 * An image which will be resized to be 200 pixels wide. Hidden if omitted.


 * imagetitle
 * The tooltip text which appears when the image is hovered. Defaults to imagedesc when omitted or to image if imagedesc is also omitted.


 * imagedesc
 * A description of the image which will appear centered directly below it. Hidden if omitted (Also hidden if parameter image is omitted).


 * Unnamed parameters will be added as fields. Each parameter couple will be treated as field name and field value. See example below for more detailed usage.
 * Unnamed parameters will be added as fields. Each parameter couple will be treated as field name and field value. See example below for more detailed usage.

Example
This is an example of an infobox about Spore (video game). See the |talk page for more examples.

Output
