Template:Center

From RimWorld Wiki
Revision as of 15:28, 4 July 2024 by Arcangelus (talk | contribs) (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.)
(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.