Editing
Template:Userbox
From PWI Wiki
Jump to navigation
Jump to search
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
<div style="float:{{{float|left}}}; border:{{{border-width|{{{border-s|1}}}}}}px solid {{{border-color|{{{1|{{{border-c|{{{id-c|#6A5D44}}}}}}}}}}}}; margin:1px;" class="wikipediauserbox"> {| cellspacing="0" style="width:238px; background:{{{info-background|{{{2|{{{info-c|#171513}}}}}}}}};" {{#if:{{{logo|{{{3|{{{id|id}}}}}}}}}| ! style="width:{{{logo-width|{{{id-w|45}}}}}}px; height:{{{logo-height|{{{id-h|45}}}}}}px; background:{{{logo-background|{{{1|{{{id-c|#332f2b}}}}}}}}}; text-align:{{{id-a|center}}}; font-size:{{{logo-size|{{{5|{{{id-s|14}}}}}}}}}pt; color:{{{logo-color|{{{id-fc|#ffcd72}}}}}}; padding:{{{logo-padding|{{{id-p|0 1px 0 0}}}}}}; line-height:{{{logo-line-height|{{{id-lh|1.25em}}}}}}; vertical-align: middle; {{{logo-other-param|{{{id-op|}}}}}}" {{!}} {{{logo|{{{3|{{{id|id}}}}}}}}} }} | style="text-align:{{{info-a|left}}}; font-size:{{{info-size|{{{info-s|8}}}}}}pt; padding:{{{info-padding|{{{info-p|0 4px 0 4px}}}}}}; height:{{{logo-height|{{{id-h|45}}}}}}px; line-height:{{{info-line-height|{{{info-lh|1.25em}}}}}}; color:{{{info-color|{{{info-fc|#b2b2b2}}}}}}; vertical-align: middle; {{{info-other-param|{{{info-op|}}}}}}" | {{{info|{{{4|''info''}}}}}} |}</div><noinclude><br clear=both> ---- == Documentation == 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. This is a slightly simplified and modified version of the [http://en.wikipedia.org/wiki/Template:Userbox Wikipedia Userbox template]. == Usage == <!-- Abstract usage of the template, one variable per row. --> <pre style="overflow: auto"> {{Userbox | float = <!--left|right|none (default = left)--> | border-c = <!--border color (default = #6a5d44)--> | border-s = <!--border width in pixels (default = 1)--> | id = <!--id image and/or text--> | id-a = <!--id horizontal alignment left/center/right/justify (default = center)--> | id-c = <!--id background color (default = #332f2b)--> | id-fc = <!--id font color (default = #ffcd72)--> | id-s = <!--id text size in points (default = 14)--> | id-p = <!--id cell padding (default = 0 1px 0 0)--> | id-lh = <!--id line height (default = 1.25em)--> | id-op = <!--id other CSS parameters--> | id-w = <!--id box width in pixels (default = 45)--> | id-h = <!--id box height in pixels (default = 45)--> | info = <!--info text and/or image--> | info-a = <!--info horizontal alignment left/center/right/justify (default = left)--> | info-c = <!--info background color (default = #171513)--> | info-fc = <!--info font color (default = #b2b2b2)--> | info-s = <!--info text size in points (default = 8)--> | info-p = <!--info padding (default = 0 4px 0 4px)--> | info-lh = <!--info line height (default = 1.25em)--> | info-op = <!--info other CSS parameters--> }} </pre> * All parameters are optional * Images should normally be scaled to x45px or less. <!-- explain what this template's parameters do -- if no params, delete the definition --> Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here: <pre> {{Userbox | border-c = <!--your border color--> | id = <!--your icon or short text ID--> | id-c = <!--background color for ID--> | id-fc = <!--font color for ID--> | info = <!--your text--> | info-c = <!--background color for text--> | info-fc = <!--font color for text--> }} </pre> '''Standard colors:'''<br> :<span style="color:#1e90ff">Blue:</span> #1e90ff<br> :<span style="color:#b22222">Red:</span> #b22222<br> :<span style="color:#f28500">Orange:</span> #f28500<br> :<span style="color:#f4c430">Yellow:</span> #f4c430<br> :<span style="color:#9932cc">Purple:</span> #9932cc<br> :<span style="color:#b49b50">Gold:</span> #b49b50<br> == Examples == {| style="background:transparent" !style="width: 300px;"| Code !Result |- | <pre>{{Userbox}}</pre> || {{Userbox}} |- | colspan="2"| Below example shows how an image may be substituted for text. The Image parameter takes the filename, display size, and alt-text (seen when you hover your mouse over the image). |- | <pre>{{Userbox | id = [[Image:TigerSmileySet.png| 45px|Tiger Smiley]] | info = ''foo bar'' | info-s = 12 | border-s = 2 }}</pre> || {{Userbox|id=[[Image:TigerSmileySet.png|45px|Tiger Smiley]]|id-s=20|info=''foo bar''|info-s=12|border-s=2}} |- | colspan="2"| 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. |- | <pre>{{Userbox | id = foo logo | info = ''We are trying to see default distance in between text lines, and, see the distance in between cell content and its border and also see total height.'' | border-s = 2 }}</pre> || {{Userbox|id=foo logo|info=''We are trying to see default distance in between text lines, and, see the distance in between cell content and its border and also see total height.''|border-s=2}} |- | colspan="2"| 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. |- | <pre>{{Userbox | id = foo logo | id-s = 14 | id-lh = 1.1em | info = ''We have specified values to lessen the distance in between text lines & padding space in between cell content and its border.'' | info-s = 8 | info-p = 1pt | info-lh = 1.05em | border-s = 1 }}</pre> || {{Userbox|id=foo logo|id-s=14|id-lh=1.1em|info=''We have specified values to lessen the distance in between text lines & padding space in between cell content and its border.''|info-s=8|info-p=1pt|info-lh=1.05em|border-s=1}} |} </noinclude>
Summary:
Please note that all contributions to PWI Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
PWpedia:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)
Template used on this page:
Template:Userbox
(
edit
)
Navigation menu
Page actions
Template
Discussion
Read
Edit
History
Page actions
Template
Discussion
More
Tools
Personal tools
Not logged in
Talk
Contributions
Create account
Log in
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
Search
Tools
What links here
Related changes
Special pages
Page information