Difference between revisions of "Template:Table"
Solar Dragon (talk | contribs) |
Solar Dragon (talk | contribs) |
||
Line 1: | Line 1: | ||
− | {| {| align="center" width="100%" style="background: #{{yellow color}}; -moz-border-radius: 1em; border: 5px solid #{{yellow color light}};" | + | {| {{#Switch:{{{collapsible|no}}} |yes = class="collapsible collapsed"}} {| align="center" width="100%" style="background: #{{yellow color}}; -moz-border-radius: 1em; border: 5px solid #{{yellow color light}};" |
|- | |- | ||
| align="center" | | | align="center" | | ||
{| {{#Switch:{{{sortable|no}}} |yes = class="sortable"}} border=1 width="100%" align="center" style="background: #FFFFFF; border:1px solid #{{yellow color}}; border-collapse:collapse;" | {| {{#Switch:{{{sortable|no}}} |yes = class="sortable"}} border=1 width="100%" align="center" style="background: #FFFFFF; border:1px solid #{{yellow color}}; border-collapse:collapse;" | ||
− | |- style="background: #{{yellow color light}}" | + | |- style="background: #{{yellow color light}}" |
{{{1}}} | {{{1}}} | ||
|} | |} |
Revision as of 19:14, January 27, 2012
|
Usage
Typical table structure should be like this:
{{Table| {{TableHeader|A}} {{TableHeader|B}} {{TableHeader|C}} {{TableBodyTop|1}} {{TableBody|2}} {{TableBody|3}} {{TableBodyTop|4}} {{TableBody|5}} {{TableBody|6}} }}
Makes:
|
The only difference between {{TableBodyTop}} and {{TableBody}} is that TableBodyTop has a |- at the top of it to separate that row from the next. Therefore, it should go at the top of each row.
{{TableColspan|Object to go in field|X}} Will add a "colspan" to the table, where "X" is the number of columns you want to take over. {{TableRowspan|Object to go in field|X}} will do the same, but with rows.
{{TableBodyTopRowspan|Object to go in field|X}} will do a rowspan for the first column of the table's row. The only difference being that there is a "|-" at the top of it.
{{TableColRowspan|Object to go in field|X|Y}} will add both a rowspan and a colspan. "X" is the rowspan number and "Y" is the colspan number in this case.