Template:Center

From RimWorld Wiki
Revision as of 13:30, 17 June 2024 by Arcangelus (talk | contribs) (Template blatantly copied from MediaWiki, with some inspiration from wikipedia proper. All because I wanted less convoluted formatting.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


Documentation icon Template documentation

This template is used to centralize the texts.

Usage

{{center|Insert text here.}}

produces:

Insert text here.

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.