Template:Center/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Cantons-de-l'Est
Interwiki.
meta>Nnemo
Notably accessibility
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM 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 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.


=== Example ===
=== Example ===
{| class="wikitable" style="width:50%;"
{| class="wikitable" style="width:50%;"
! style="width:100px;" | Code
! style="width:100px;" | Code
| <nowiki>{{Center|Hello world!}}</nowiki>
| <code><nowiki>{{Center|Hello world!}}</nowiki></code>
|-
|-
! style="width:100px;" | Result
! style="width:100px;" | Result
Line 14: Line 17:
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><!--
<includeonly><!--  
++++ PLEASE ADD CATEGORIES AND INTERWIKIS BELOW THIS LINE, THANK YOU. -->
++++ PLEASE ADD CATEGORIES AND INTERWIKIS AFTER THIS LINE, THANK YOU. -->
 
[[Category:Wikipedia formatting and function templates]]
[[Category:Wikipedia formatting and function templates]]
[[Category:Wikipedia XHTML tag replacing templates]]
[[Category:Wikipedia XHTML tag replacing templates]]
Line 22: Line 26:
[[ja:Template:Center]]
[[ja:Template:Center]]
[[tr:Şablon:Ortala]]
[[tr:Şablon:Ortala]]
</includeonly>
</includeonly>

Revision as of 14:03, 14 July 2012


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

Example

Code {{Center|Hello world!}}
Result
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>