Template:Userboxtop View history

(Created page with "{{Documentation subpage}} <!-- Categories go at the bottom of this page and interwikis go in Wikidata. --> This template can be used to collect images or userboxes into a sin...")
 
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{Documentation subpage}}
{|class="userboxes" style="margin-left: {{{left|1}}}em;; margin-bottom: 0.5em; width: 248px; border: {{{bordercolor|#99B3FF}}} solid 1px; background-color: {{{backgroundcolor|#FFFFFF}}}; color: {{{textcolor|#000000}}}; float: {{{2|{{{align|right}}}}}}; {{{extra-css|}}}"
<!-- Categories go at the bottom of this page and interwikis go in Wikidata. -->
|<div style="text-align: center; font-size: 120%; font-weight: bold;">{{{1|{{{toptext|[[Wikibooks:Userboxes|Userboxes]]}}}}}}</div><noinclude>
 
This template can be used to collect images or userboxes into a single column grouping easily.
 
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 {{tl|stack}}. This template will add pages in the [[WP:NS0|main namespace]] to [[:category:articles incorrectly using userbox templates]] if used there.
 
=== Usage ===
 
<pre>
{{ userboxtop
| toptext        =
| align          =
| left            =
| backgroundcolor =
| bordercolor    =
| extra-css      =
| textcolor      =
}}
 
{{userboxname1}}
{{userboxname2}}
{{userboxname3}}
{{userboxname4}}
{{...etc}}}
 
{{userboxbottom}}
</pre>
 
=== Parameters ===
 
Detailed explanations of the parameters are below. All of the parameters are optional.
 
{| class="wikitable"
|-
! Parameter
! Valid values
|-
| <code>toptext</code>
| (or the first positional parameter) Overrides the standard "'''[[Wikipedia:Userboxes|Userboxes]]'''" text and link. Can include wiki-markup.
|-
| <code>align</code>
| <code>left</code> or <code>right</code> (default) <!-- <code>center</code> does not work -->
|-
| <code>left</code>
| Any left margin value. Defaults to 1.
|-
| <code>backgroundcolor</code>
| Any [[Web colors|web color]] (name or <tt>#XXXXXX</tt> hex format). Defaults to <tt>#FFFFFF</tt>.
|-
| <code>bordercolor</code>
| Any [[Web colors|web color]] (name or <tt>#XXXXXX</tt> hex format). Defaults to <tt>#99B3FF</tt>.
|-
| <code>extra-css</code>
| Allows you to provide additional [[Cascading Style Sheets|CSS]] style information.
|-
| <code>textcolor</code>
| Any [[Web colors|web color]] (name or <tt>#XXXXXX</tt> hex format). Defaults to <tt>#000000</tt>.
|}
|}
 
{{documentation}}
You may also insert breaks by using {{tl|userboxbreak}}. See that template for details.
</noinclude>
 
=== 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 [[WP:SKIN|skin]]'s CSS file, and add the following–
 
<code><nowiki>table.userboxes { display: none; }</nowiki></code>
 
== Redirects ==
* {{tl|BoxTop}}
* {{tl|Boxboxtop}}
* {{tl|Boxtop}}
* {{tl|User box top}}
* {{tl|Userbox top}}
 
== See also ==
 
* {{tl|Userboxbreak}}
* {{tl|Userboxbottom}}
* {{tl|Userboxside}}
 
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox||
<!-- Categories go here and interwikis go in Wikidata. -->
[[Category:User namespace templates]]
}}</includeonly>

Latest revision as of 23:10, 7 February 2016

Documentation icon Template documentation[view] [edit] [history] [purge]

Purpose

This collects 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 a page.

Usage

{{userboxtop
| align = 
| left =
| backgroundcolor = 
| bordercolor = 
| extra-css =
| textcolor = 
| toptext = 
}}

[userboxes]

{{userboxbottom}}

All of the parameters are optional.

Customizing

Detailed explanations of the parameters are below.

Parameter Valid values
align left or right (default)
left Any left margin value. 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 Allows you to provide additional CSS style information.
textcolor Any web color (name or #XXXXXX hex format). Defaults to #000000.
toptext Overrides the standard Userbox text and link. Can include wiki-markup.

You may also insert breaks by using {{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, vector.css for the Vector skin) and add the following:

table.userboxes { display: none; }

See also

The above documentation is transcluded from Template:Userboxtop/doc.
Please add categories to the /doc subpage.
Subpages of this template.