Revision as of 23:16, 9 September 2006 view sourceBarkerJr (talk | contribs)699 editsm correct html nesting← Previous edit | Latest revision as of 06:26, 7 July 2024 view source SilverLocust (talk | contribs)Administrators25,139 edits dark mode | ||
(30 intermediate revisions by 20 users not shown) | |||
Line 1: | Line 1: | ||
{| |
{| role="presentation" class="userboxes" style="margin: auto; margin-bottom: 0.5em; width: 248px; border: {{{bordercolor|#99B3FF}}} solid 1px; background-color: {{{backgroundcolor|#FFFFFF; background-color: var(--background-color-base, #FFFFFF);}}}; color: {{{textcolor|#000000; color: var(--color-emphasized, #000000)}}}; float: {{{2|{{{align|right}}}}}}; {{{extra-css|}}}" | ||
|<center> |
|<div style="text-align: center; font-size: 120%; font-weight: bold;{{{toptextstyle|}}}">{{{1|{{{toptext|]}}}}}}</div><includeonly>{{ns0|]}}</includeonly><noinclude> | ||
|} | |} | ||
<!-- CATEGORIES GO ON THE /doc SUBPAGE; INTERWIKIS GO TO WIKIDATA, THANK YOU! --> | |||
==Purpose== | |||
{{Documentation}} | |||
To collect images or userboxes into a single column grouping easily. This template is not just for userboxes; it is also an efficient way of creating a column of images to run along the side of an article. {{tl|Gallery}}, by contrast, creates rows of images and is used when the images should not run alongside the text but rather should serve as a break in the text. | |||
==Usage== | |||
<pre><nowiki>{{userboxtop | |||
| align = | |||
| backgroundcolor = | |||
| bordercolor = | |||
| extra-css = | |||
| textcolor = | |||
| toptext = | |||
}} | |||
{{userboxbottom}}</nowiki></pre> | |||
All of the parameters are '''optional'''. | |||
===Customizing=== | |||
Detailed explanations of the parameters are below. | |||
{| class="wikitable" | |||
|- | |||
! Parameter | |||
! Valid values | |||
|- | |||
| <code>align</code> | |||
| <code>left</code>, <code>center</code>, or <code>right</code> (default) | |||
|- | |||
| <code>backgroundcolor</code> | |||
| Any ] (name or <tt>#XXXXXX</tt> hex format). Defaults to <tt>#FFFFFF</tt>. | |||
|- | |||
| <code>bordercolor</code> | |||
| Any ] (name or <tt>#XXXXXX</tt> hex format). Defaults to <tt>#99B3FF</tt>. | |||
|- | |||
| <code>extra-css</code> | |||
| Allows you to provide additional ] style information. | |||
|- | |||
| <code>textcolor</code> | |||
| Any ] (name or <tt>#XXXXXX</tt> hex format). Defaults to <tt>#000000</tt>. | |||
|- | |||
| <code>toptext</code> | |||
| Overrides the standard ] text and link. Can include wiki-markup. | |||
|} | |||
You may also insert breaks by using {{tl|userboxbreak}}. See that template for details. | |||
==Hiding userboxes== | |||
You can hide userboxes which utilize this (as well as a few other) forms of template-based userbox organization. Simply edit your userspace CSS override (for example, ] for the Monobook skin) and add the following– | |||
<code><nowiki>#userboxes { display: none; }</nowiki></code> | |||
==See also== | |||
*] | |||
*] | |||
] | |||
] | |||
] | |||
] | |||
</noinclude> | </noinclude> |
Latest revision as of 06:26, 7 July 2024
Userboxes |
This template is used on approximately 59,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them. |
- {{ubxt}}
This template can be used to organize userboxes (or other user-page content) into a single column grouping.
Please do not use this in articles: for historic reasons this template uses different rules for floating alongside other templates and this will lead to unpredictable results. If you need to stack objects in an article for some reason, use {{stack}}. This template will add pages in the main namespace to Category:Articles incorrectly using userbox templates.
Usage
{{Userboxtop | toptext = | toptextstyle = | align = | left = | backgroundcolor = | bordercolor = | extra-css = | textcolor = }} {{userboxname1}} {{userboxname2}} {{userboxname3}} {{userboxname4}} {{...etc}}} {{Userboxbottom}}
Note that {{Userboxbottom}}
must be separated from the last userbox by a newline. In the absence of a newline, other text on the page may appear inside the confines of the userbox area.
Parameters
All parameters are optional.
Parameter | Description |
---|---|
toptext
|
(or the first positional parameter) Overrides the default header "Userboxes". Can include wiki-markup. |
toptextstyle
|
Additional CSS code for the toptext .
|
align
|
(or the second positional parameter) left or center or right (default)
|
left
|
Left margin in CSS's ems. Defaults to 1. |
backgroundcolor
|
Any web color (name or #XXXXXX hex format). Defaults to #FFFFFF .
|
bordercolor
|
Any web color (name or #XXXXXX hex format). Defaults to #99B3FF .
|
extra-css
|
Additional CSS code for the box itself. |
textcolor
|
Any web color (name or #XXXXXX hex format). Defaults to #000000 .
|
You may also insert breaks by using {{userboxbreak}}. See that template for details.
Hiding userboxes
You can hide userboxes which use this (as well as a few other) forms of template-based userbox organization. Simply go to Special:Mypage/skin.css, which redirects to your current skin's CSS file, and add the following:
table.userboxes { display: none; }
Redirects
- {{BoxTop}}
- {{Boxboxtop}}
- {{Boxtop}}
- {{User box top}}
- {{Userbox top}}
See also
- {{Userboxbreak}}
- {{Userboxbottom}}
- {{Userboxside}}
- {{Userboxgroup}}
TemplateData
This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Userboxtop in articles based on its TemplateData.TemplateData for Userboxtop
This template can be used to organize userboxes (or other user-page content) into a single column grouping. Please do *not* use this in articles. Please see https://en.wikipedia.org/Template:Userboxtop/doc for full documentation.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Header (toptext) | toptext 1 | Overrides the default header "Userboxes". Can include wiki-markup
| Line | suggested |
Alignment | align 2 | Whether you want your userbox to be left-aligned or right-aligned. Value must be 'left' or 'right'.
| Line | suggested |
Header style (toptextstyle) | toptextstyle | Additional CSS code for the header (toptext). | String | optional |
Text colour | textcolor | Default colour for text within this userbox. Any web color (name or #XXXXXX hex format). Defaults to #000000.
| Line | optional |
Left margin size | left | Left margin size (in CSS ems). Defaults to 1
| Number | optional |
Border colour | bordercolor | Colour for the userbox border. Any web color (name or #XXXXXX hex format). Defaults to #99B3FF.
| Line | optional |
Background colour | backgroundcolor | Background colour for this userbox. Any web color (name or #XXXXXX hex format). Defaults to #FFFFFF.
| Line | optional |
Extra CSS | extra-css | Additional CSS code for the box itself. | String | optional |
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template. Categories: