Template:Center/doc: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>Fryed-peach
mNo edit summary
meta>Gadget850
→‎Example: update from current code
Line 13: Line 13:


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 style="text-align: center;"></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 BELOW THIS LINE, THANK YOU. -->

Revision as of 10:58, 3 July 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" style="width:auto; margin-left:auto; margin-right:auto;">your text</div>