Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Code to center a table of userboxes  



1.1  Sandbox code to center a table of userboxes  
















Template:Userboxtop/testcases







Add links
 









Template
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Get shortened URL
Download QR code
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 

< Template:Userboxtop

Just title text

{{Userboxtop|Text of the title}}
{{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}}
Side by side comparison
{{Userboxtop}}{{Userboxtop/sandbox}}

Colors

{{Userboxtop|Colors|bordercolor=green|backgroundcolor=cyan|textcolor=maroon}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
Side by side comparison
{{Userboxtop}}{{Userboxtop/sandbox}}

Left aligned

{{Userboxtop|Should be left aligned|align=left}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}

{{Userboxtop}}



{{Userboxtop/sandbox}}


Center aligned

{{Userboxtop|Should be center aligned|align=center}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}

{{Userboxtop}}



{{Userboxtop/sandbox}}


Extra CSS

{{Userboxtop|With extra CSS|extra-css=border-style:dashed; border-width: 5px; text-decoration: overline wavy;}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
Side by side comparison
{{Userboxtop}}{{Userboxtop/sandbox}}

|toptextstyle=

{{Userboxtop|toptext=Foobar Xyzzy|toptextstyle=font-family: Times, serif; font-size: 200%;}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
Side by side comparison
{{Userboxtop}}{{Userboxtop/sandbox}}

Extra CSS to try to align the box in the center of the page (doesn't work because of margin-left handling)

{{Userboxtop|With extra CSS|extra-css=margin:auto;|float=none}}
{{User NPOV}}{{User signs posts}}
{{Userboxbottom}}
Side by side comparison
{{Userboxtop}}{{Userboxtop/sandbox}}

Code to center a table of userboxes

[edit]

The template's handling of margin-left appears to prevent centering. There may be a workaround aside from this manual code.

Sandbox code to center a table of userboxes

[edit]

Sandbox no-align (default to right)

Sandbox align=right

Sandbox align=center (to output invalid float=center, which is ignored in favor of margin:auto)

Sandbox align=left

Sandbox align=none (to output the valid float=none)

Sandbox float=none

Sandbox align=middle


Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Userboxtop/testcases&oldid=1169554085"

Categories: 
Template test cases
User css-2
User js-2
User xml-2
User php-2
User html-2
 



This page was last edited on 9 August 2023, at 20:39 (UTC).

Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



Privacy policy

About Wikipedia

Disclaimers

Contact Wikipedia

Code of Conduct

Developers

Statistics

Cookie statement

Mobile view



Wikimedia Foundation
Powered by MediaWiki