Template:Center/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Fryed-peach
mNo edit summary
meta>Fryed-peach
mNo edit summary
Line 3: Line 3:
This is a simple template to align stuff to the center. To use this, place <nowiki>{{center|text}}</nowiki> on the desired page, replacing ''text'' with the desired content.
This is a simple template to align stuff to the center. To use this, place <nowiki>{{center|text}}</nowiki> on the desired page, replacing ''text'' with the desired content.


===Example===
=== Example ===
{| class="wikitable" style="width:50%;"
{| class="wikitable" style="width:50%;"
| style="width:100px;" | '''Code''' || <nowiki>{{center|Hello world!}}</nowiki>
! style="width:100px;" | Code
| <nowiki>{{center|Hello world!}}</nowiki>
|-
|-
| style="width:100px;" | '''Result''' || {{center|Hello world!}}
! style="width:100px;" | Result
| {{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:
:<tt><nowiki><div align="center"></nowiki></tt>''your text''<tt><nowiki></div></nowiki></tt>
:<code><nowiki><div class="center"></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 BELOW THIS LINE, THANK YOU. -->

Revision as of 15:49, 30 March 2009

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">your text</div>