Help:Userbox

This page explains what a userbox is and how to use, alter and create one.

What is a userbox?
A userbox is a box that describes you, a user. It can represent a multitude of things:
 * Favorite game
 * Favorite series
 * Favorite characters
 * Favorite consoles
 * Stuff about you on and/or off the wiki

Many userboxes make up a userbox tower, a bunch of organized userboxes lined up vertically. There are quite a few available already at Userboxes, but to really express yourself, you may wish to make your own.

Contents of a userbox

 * 1) The border color sets what it says.
 * 2) Mainbkgd stands for main background, where the message (6) text is set at.
 * 3) Codebkgd likewise stands for the code background, where the left-handed box text or image is set at.
 * 4) Codecolor changes the text color in the left-hand box. If an image is used instead, this still has to be filled in, but it will be ineffective.
 * 5) Code is what is filled in the left-hand box, either text or an image. An image should not be more than 40 X 40 pixels (see below).
 * 6) Msg, likewise, is what is filled in on the right-hand side. Wiki code can be used.

The four six-alphanumeric codes above are hex decimal colors. The maincolor is automatically black, but can be changed using  tags.

Code of a userbox
''Note: Please know what a hex color is before reading this section. Also see a list of hex colors.''

The code of the vg-5 userbox above is

 . As revealed by the two squiggly brackets, the code is a template. There is also a top and a bottom template to add in-between the userboxes, completing the userbox tower. The code of these templates, one at a time:

Userboxtop
 {| name="userboxes" id="userboxes" style="float: right; margin-left: 1em; margin-bottom: 1ex; width: 242px; border: 1px solid #99B3FF; clear: right"
 * style="text-align: center" | Userbox tower
 * 
 * 
 * 

This part opens up a table, aligned to the right, with the header "Userbox Tower" (linking to the userbox page). It sets up the main code...

Userbox
 |- 
 * 

If you've been reading this tutorial, the words in between the three squiggly brackets (not two), you should be understanding how it works now. Those six IDs are variables that can be changed for each userbox, by specificing ID=_____ each time, inbetween |s. The hex colors require a # before the six characters. There can be as many userboxes as you want, and they will be "stacked" on top of one another in the right-hand table going down, hence where the name Userbox Tower came from. Each userbox is an individual table inside of a whole tower table.

Userboxbottom
|}

Yes, you're reading everything right. Though you can just as easily type |}</tt>, using denotes the end of the userbox on your user page, making it easier to navigate when editing. The sole purpose of the code itself is to close the Tower table from.

Userboxp
Added on 15 October 2006, is the same as, without the |-</tt> and |</tt> at the beginning. Thus, the box can stand on its own (no need of a top/bottom template) and boxes can be grouped accordingly. Because of varying heights of userboxes, however, it's highly suggested you group all userboxp userboxes in a table.

Advanced techniques
There are a few steps beyond the normal style to make your userboxes look unique:


 * 1) Make the border and codebkgd colors the same. This makes the border look like it's coming out of the left side for a cool effect.
 * 2) Make the codebkgd and mainbkgd color the same for a uniform background color throughout the whole userbox.
 * 3) In the code (left-hand) text, images are allowed. Be sure that they are only 40 X 40 max in pixels, or resize it in the code.  code=[[Image:formyuserbox.png|40px]] </tt>
 * 4) Change the color of text (default black) by using  {{color-text|text|#RRGGBB </tt>. Other span changes include:
 * 5) text-decoration: underline</tt>, or
 * 6) line-through</tt>, for a strikeout effect

{{Wikipolicy}}

{{Shortcut|MW:USERBOX}}