Difference between revisions of "Template:Userboxtop"

Explain xkcd: It's 'cause you're dumb.
Jump to: navigation, search
 
(3 intermediate revisions by the same user 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|}}}"
 
{| 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|}}}"
|<div style="text-align: center; font-size: 120%; font-weight: bold;{{{toptextstyle|}}}">{{{1|{{{toptext|[[Wikipedia:Userboxes|Userboxes]]}}}}}}</div><includeonly>{{ns0|[[category:articles incorrectly using userbox templates]]}}</includeonly><noinclude>
+
|<div style="text-align: center; font-size: 120%; font-weight: bold;{{{toptextstyle|}}}">{{{1|{{{toptext|[[Wikipedia:Userboxes|Userboxes]]}}}}}}</div><noinclude>
 
|}
 
|}
  
Line 8: Line 8:
 
== Usage ==
 
== Usage ==
 
<nowiki>
 
<nowiki>
{{Userboxtop<br>
+
{{Userboxtop</nowiki><br><nowiki>
 
| toptext        = </nowiki><br><nowiki>
 
| toptext        = </nowiki><br><nowiki>
 
| toptextstyle    = </nowiki><br><nowiki>
 
| toptextstyle    = </nowiki><br><nowiki>
Line 59: Line 59:
 
|}
 
|}
  
You may also insert breaks by using [[Template:Userboxbreak|Userboxbreak]]}}. See that template for details.
+
You may also insert breaks by using [[Template:Userboxbreak|Userboxbreak]]. See that template for details.
  
 
== Hiding userboxes ==
 
== Hiding userboxes ==
Line 69: Line 69:
 
</code>
 
</code>
  
[[Category:Userspace templates]]
+
<noinclude>[[Category:Userspace templates]]</noinclude>

Latest revision as of 18:08, 22 April 2026

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. Intended for user pages ONLY.

Usage[edit]

{{Userboxtop
| toptext =
| toptextstyle =
| align =
| left =
| backgroundcolor =
| bordercolor =
| textcolor =
}}
{{userbox1}}
{{userbox2}}
{{userbox3}}
{{userbox4}}
{{...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[edit]

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.
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[edit]

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; }