w:c:strategywiki>DrBob m (Protected "Template:Prettytable": Widely-used [edit=sysop:move=sysop]) |
w:c:strategywiki>DrBob m (Cleanup) |
||
Line 1: | Line 1: | ||
border="1" cellspacing="4" cellpadding="1" class="wikitable {{qif|test={{{sortable|}}}|then=sortable}}" rules="all" style="margin:1em;border:solid 1px #AAA; border-collapse:collapse;empty-cells:show;{{qif|test={{{notwide|}}}|then=|else=width:100%;}}{{qif|test={{{text center|}}}|then=text-align:center;}}{{{style|}}}"<noinclude> | <includeonly>border="1" cellspacing="4" cellpadding="1" class="wikitable {{qif|test={{{sortable|}}}|then=sortable}}" rules="all" style="margin:.1em;border:solid 1px #AAA; border-collapse:collapse;empty-cells:show;{{qif|test={{{notwide|}}}|then=|else=width:100%;}}{{qif|test={{{text center|}}}|then=text-align:center;}}{{{style|}}}"</includeonly><noinclude> | ||
Template to put at the top of table declarations to standardise and prettify their appearance. | Template to put at the top of table declarations to standardise and prettify their appearance. |
Revision as of 23:25, 9 March 2007
Template to put at the top of table declarations to standardise and prettify their appearance.
By default it will make the table occupy all the page's width. If you want to turn it off, call the template as follows: {{prettytable|notwide=1}}. Additionally, you can mark the table as sortable (i.e. if it's a table of sortable values, such as {{yes}} or {{no}}), by using the "sortable" parameter: {{prettytable|sortable=1}}. Text can be centred in the table using {{prettytable|text center=1}}. Finally, extra styling can be added using the "style" parameter.
Example
Wide
{| {{prettytable}} | Boo! | Foo | Bar |- | Test | 2 | 3 |}
Boo! | Foo | Bar |
Test | 2 | 3 |
Not wide
{| {{prettytable|notwide=1}} | Boo! | Foo | Bar |- | Test | 2 | 3 |}
Boo! | Foo | Bar |
Test | 2 | 3 |