The {center} macro allows you to quickly and easily center content...
There are many times when you want to center text, only to find that the html macro has been disabled or the html-tag macro has been configured not to allow center tags, etc. The {center} user macro has been developed as a simple way to center content.
Parameters:
Add the macro to your page as follows:
{center}your content{center}
Examples:
Standard Use
Center some text:
{center}some text{center}
Which results in:
some text
Centering Table Text
Text in table header cells is always centered but this can sometimes make a table look ugly because the normal cells are always left-aligned:
Heading 1
Heading 2
a
b
To get round this problem, you can center the text in a table cell as follows:
The macro allows you to center any content, not just text. In this example, we will center an entire table:
{center}
||Heading 1||Heading 2||
|a|b|
{center}
Which results in:
Heading 1
Heading 2
a
b
This is a great way to make tables look much nicer on-screen. However the {center} macro cannot be nested so if you center the table, you can't center the content of the normal cells inside the table.
Hints and Tips:
To center images, it's quicker and easier to use the inbuilt settings (see Image Options for details):