Template:Center
From A KoL Wiki
[edit]
{{Center}}
<div class="center" style="width:auto; margin-left:auto; margin-right:auto; {{#if: {{{style|}}} | {{{style}}};}}">{{{1}}}</div>
Usage
Creates a block of center-aligned text. The block itself also has margin-left:auto; margin-right:auto
, so it too will be centered if an appropriate width is given via CSS.
This is based on the wikipedia:Template:Center template.
Note: Don't use this tag to center-align tables. Instead, use:
{| style="margin-left: auto; margin-right: auto" | This is a centered table |}
Usage
To create centered text:
{{center|Here is some centered text}}
Here is some centered text
To apply additional CSS:
{{center|style=border: 1px solid green; padding: 1em; max-width: 300px|Centered text with extra styles}}
Centered text with extra styles