Userboxes

edit

You can use userboxes to let other users know about your Wikipedia interests and background. Visit Wikipedia:Userboxes/Galleries and Wikipedia:Userboxes/Interests for links to galleries of existing userbox templates that you can use on your own user page. You can also easily create your own userbox templates using Template:Userbox.

Template:Userbox

edit

Default dimensions

edit

By default, Template:Userbox creates standard dimension userboxes with a height of 47 pixels and a length of 240 pixels with right and bottom padding of 4 pixels but no left or top padding. Template:Userbox allows you to allows you to alter its standard dimension, but I strongly urge you to stick with the standard dimensions. Standard userboxes stack neatly regardless of your browser width. Try moving your browser window in and out and view the 36 standard userboxes below.

 This user has visited Austria.
 This user has visited the Bahamas.
 This user has visited Denmark.
 This user has visited England.
 This user has visited Estonia.
 This user has visited Finland.
 This user has visited France.
 This user has visited
8 of the 16 states of Germany.
 This user has visited Gibraltar.
 This user has visited Guam.
 This user has visited Hungary.
 This user has visited Iceland.
 This user has visited Italy.
 This user has visited Japan.
 This user has visited Morocco.
 This user has visited the Netherlands.
 This user has visited Norway.
 This user has visited Poland.
 This user has visited Portugal.
 This user has visited Russia.
 This user has visited Scotland.
 This user has visited Singapore.
 This user has visited Slovakia.
 This user has visited Spain.
 This user has visited Sweden.
 This user has visited 43 of the 50 U.S. states and the District of Columbia.
 This user has visited Vietnam.
 This user has visited Wales.
 This user has cruised the Atlantic Ocean.
 This user has cruised the Pacific Ocean.
 This user has cruised the Baltic Sea.
 This user has cruised the Caribbean Sea.
 This user has cruised the Mediterranean Sea.
 This user has cruised the North Sea.

Default sizes

edit

Template:Userbox has 29 optional parameters. Many of these parameters have standard defaults values so you only need to deal with a few of them. The default border width, border-w, is 1 pixel, which is fine for almost all userboxes.

Within the userbox border there are two rectangular areas: id which can contain an image or text, and info which usually contains text explaining the purpose of the userbox. Area id is optional, and if you leave it out, info will occupy the entire area of the userbox.

The default width of id is 45 pixels. If the contents of id exceed 45 pixels, the width will automatically adjust to fit the contents. If you set the width id-w=0, the width will automatically adjust to the width of the contents. The default right padding of id is 1 pixel. The default width of info is automatically adjusted to fit the remaining width of the userbox.

The default height of both id and info is 47 pixels less the width of the top and bottom borders, or 45 pixels with borders of 1 pixel. If the contents of either id or info exceed 45 pixels, the height of the userbox will be automatically adjusted to fit the greater height. I strongly recommend that you limit the height of id and info to no more than 45 pixels to maintain standard userbox dimensions.

Default colors

edit

Both id and info font colors default to black, the best choice for light colored backgrounds. The id background color, id-c, defaults to  #DDDDDD  and the info background color, info-c, defaults to  #EEEEEE . The border color, border-c, defaults to the same color as id-c. You can change these colors to whatever you like. If you do not wish to have a visible border or background, you can set the color to transparent, to create a disembodied userbox like that below.

If you choose a dark background color, you may wish to change the font color to white or a light yellow or other color. Any links in your text will display in the default link color: #0645AD for an unvisited link or #0B0080 for a visited link. If you use a dark background color, you may wish to change the link color to white or a very light color, e.g., '''[[Help:Link color|<span style="color:white;">link color<span>]]'''.