Template:Userboxtop/testcases
{{Testcases}}
{{test case nowiki
| format = columns
| collapsible = yes
| showcode = yes
| title = Just title text
| code =
{{User NPOV}}{{User edit war positive}}{{User wikipedia/No personal attacks}}{{User signs posts}}{{User t|3|c}}{{User css-2}}{{User js-2}}{{User xml-2}}{{User php-2}}{{User HTML-2}}{{User web archive}}{{User:Technical_13/Userboxes/BinaryPeople}}
{{Userboxbottom}}
}}
{{test case nowiki
| format = columns
| collapsible = yes
| showcode = yes
| title = Colors
|
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
}}
{{test case nowiki
| collapsible = yes
| showcode = yes
| title = Left aligned
|
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
}}
{{test case nowiki
| collapsible = yes
| showcode = yes
| title = Center aligned
|
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
}}
{{test case nowiki
| format = columns
| collapsible = yes
| showcode = yes
| title = Extra CSS
|
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
}}
{{test case nowiki
| format = columns
| collapsible = yes
| showcode = yes
| title = {{para|toptextstyle}}
|
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
}}
{{test case nowiki
| format = columns
| collapsible = yes
| showcode = yes
| title = Extra CSS to try to align the box in the center of the page (doesn't work because of margin-left
handling)
|
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
}}
Code to center a table of userboxes
The template's handling of margin-left
appears to prevent centering. There may be a workaround aside from this manual code.
{| role="presentation" class="userboxes" style="margin-bottom: 0.5em; width: 248px; border: #99B3FF solid 1px; background-color: #FFFFFF; color: #000000; float: none; margin:auto;"
|
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
=Sandbox code to center a table of userboxes=
Sandbox no-align (default to right)
{{Userboxtop/sandbox}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
{{-}}
Sandbox align=right
{{Userboxtop/sandbox|align=right}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
{{-}}
Sandbox align=center (to output invalid float=center, which is ignored in favor of margin:auto)
{{Userboxtop/sandbox|align=center}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
{{-}}
Sandbox align=left
{{Userboxtop/sandbox|align=left}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
{{-}}
Sandbox align=none (to output the valid float=none)
{{Userboxtop/sandbox|align=none}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
{{-}}
Sandbox float=none
{{Userboxtop/sandbox|float=none}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
{{-}}
Sandbox align=middle
{{Userboxtop/sandbox|align=middle}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
{{-}}