Template:Center/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>DixonDBot
m Migrating 6 interwiki links, now provided by Wikidata on d:Q5459259
meta>Gadget850
ce
Line 3: Line 3:
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE END OF THIS PAGE. -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE END OF THIS PAGE. -->


This is a simple template to align stuff to the center. To use this, place <nowiki>{{Center|&lt;text>}}</nowiki> on the desired page, replacing ''&lt;text>'' with the desired content.
This is a simple template to center align content.


=== Example ===
=== Example ===


{| class="wikitable" style="width:50%;"
{{markup
! style="width:100px;" | Code
| <nowiki>{{Center|Hello world!}}</nowiki>
| <code><nowiki>{{Center|Hello world!}}</nowiki></code>
|-
! style="width:100px;" | Result
| {{Center|Hello world!}}
| {{Center|Hello world!}}
|}
}}


To do this without a template, simply use the following code:
To do this without a template, simply use the following code:
:<code><nowiki><div class="center" style="width:auto; margin-left:auto; margin-right:auto;"></nowiki></tt>''your text''<tt><nowiki></div></nowiki></code>
:<code><nowiki><div class="center" style="width:auto; margin-left:auto; margin-right:auto;"></nowiki></tt>''your text''<tt><nowiki></div></nowiki></code>


<includeonly><!--  
To center a table, see [[Help:TABLECENTER]].
 
<includeonly><!--
++++ PLEASE ADD CATEGORIES AND INTERWIKIS AFTER THIS LINE, THANK YOU. -->
++++ PLEASE ADD CATEGORIES AND INTERWIKIS AFTER THIS LINE, THANK YOU. -->



Revision as of 15:33, 26 April 2013


This is a simple template to center align content.

Example

Markup Renders as
{{Center|Hello world!}}
Hello world!

To do this without a template, simply use the following code:

<div class="center" style="width:auto; margin-left:auto; margin-right:auto;">your text</div>

To center a table, see Help:TABLECENTER.