Difference between revisions of "Template:Center"
Jump to navigation
Jump to search
Arcangelus (talk | contribs) (Template blatantly copied from MediaWiki, with some inspiration from wikipedia proper. All because I wanted less convoluted formatting.) |
Arcangelus (talk | contribs) m (I think the "_" in Category was stopping this page from properly appearing on the Category page (but it was still counted). Worse case, this will do nothing.) |
||
Line 25: | Line 25: | ||
</div> | </div> | ||
− | [[Category: | + | [[Category:Formatting templates]] |
</noinclude> | </noinclude> |
Latest revision as of 15:28, 4 July 2024
Template documentation
This template is used to centralize the texts.
Usage
{{center|Insert text here.}}
produces:
Insert text here.
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |
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 HERE</div>
In the alternative, the following is also valid:
<div style="text-align: center;">YOUR TEXT HERE</div>
Do note that this template only works with text. It will work if applied to a image's caption, but not if applied to the image itself. It won't work on tables either. If either of the codes described above area applied to a table directly, then its contents will be centered but not the table itself.