Difference between revisions of "Template:Election table/doc"
imported>Plastikspork m (Plastikspork moved page Template:Electiontable/doc to Template:Election table/doc without leaving a redirect: Per page move) |
imported>WOSlinker (tidy style for better HTML5 compatibility) |
||
| Line 12: | Line 12: | ||
2020''' | 2020''' | ||
|-style="background:#E9E9E9;" | |-style="background:#E9E9E9;" | ||
| − | !colspan="2" | + | ! colspan="2" style="text-align:left;" |Parties |
!Votes | !Votes | ||
!% | !% | ||
| Line 19: | Line 19: | ||
!+/- | !+/- | ||
|- | |- | ||
| − | | | + | | style="background-color:#ff0000;" | |
| − | | | + | | style="text-align:left;" |The red party |
|6042 | |6042 | ||
|45.40 | |45.40 | ||
| Line 27: | Line 27: | ||
| -2 | | -2 | ||
|- | |- | ||
| − | | | + | | style="background-color:#00ff00;" | |
| − | | | + | | style="text-align:left;" |The green party |
|5678 | |5678 | ||
|42.67 | |42.67 | ||
| Line 35: | Line 35: | ||
|0 | |0 | ||
|- | |- | ||
| − | | | + | | style="background-color:#0000ff;" | |
| − | | | + | | style="text-align:left;" |Free Mars |
|345 | |345 | ||
|2.59 | |2.59 | ||
| Line 43: | Line 43: | ||
| +1 | | +1 | ||
|- | |- | ||
| − | | | + | | style="background-color:#eeeeee;" | |
| − | | | + | | style="text-align:left;" |None of the above (unfilled seats) |
|1242 | |1242 | ||
|9.33 | |9.33 | ||
| Line 51: | Line 51: | ||
| +1 | | +1 | ||
|-style="background:#E9E9E9;" | |-style="background:#E9E9E9;" | ||
| − | !colspan="2" | + | ! colspan="2" style="text-align:left;" |Total |
!13307 | !13307 | ||
!align="center" colspan="2"|100% | !align="center" colspan="2"|100% | ||
| Line 60: | Line 60: | ||
{{electiontable|Table template pagename}}'''Summary of [[Mars|Martian]] election results, 2020''' | {{electiontable|Table template pagename}}'''Summary of [[Mars|Martian]] election results, 2020''' | ||
|-style="background:#E9E9E9;" | |-style="background:#E9E9E9;" | ||
| − | !colspan="2" | + | ! colspan="2" style="text-align:left;" |Parties |
!Votes | !Votes | ||
!% | !% | ||
| Line 67: | Line 67: | ||
!+/- | !+/- | ||
|- | |- | ||
| − | | | + | | style="background-color:#ff0000;" | |
| − | | | + | | style="text-align:left;" |The red party |
|6042 | |6042 | ||
|45.40 | |45.40 | ||
| Line 75: | Line 75: | ||
| -2 | | -2 | ||
|- | |- | ||
| − | | | + | | style="background-color:#00ff00;" | |
| − | | | + | | style="text-align:left;" |The green party |
|5678 | |5678 | ||
|42.67 | |42.67 | ||
| Line 83: | Line 83: | ||
|0 | |0 | ||
|- | |- | ||
| − | | | + | | style="background-color:#0000ff;" | |
| − | | | + | | style="text-align:left;" |Free Mars |
|345 | |345 | ||
|2.59 | |2.59 | ||
| Line 91: | Line 91: | ||
| +1 | | +1 | ||
|- | |- | ||
| − | | | + | | style="background-color:#eeeeee;" | |
| − | | | + | | style="text-align:left;" |None of the above (unfilled seats) |
|1242 | |1242 | ||
|9.33 | |9.33 | ||
| Line 99: | Line 99: | ||
| +1 | | +1 | ||
|-style="background:#E9E9E9;" | |-style="background:#E9E9E9;" | ||
| − | !colspan="2" | + | ! colspan="2" style="text-align:left;" |Total |
!13307 | !13307 | ||
!align="center" colspan="2"|100% | !align="center" colspan="2"|100% | ||
| Line 117: | Line 117: | ||
<includeonly> | <includeonly> | ||
| − | [[Category:Election result formatting templates | + | [[Category:Election result formatting templates]] |
</includeonly> | </includeonly> | ||
Revision as of 21:09, 20 December 2014
| This is a documentation subpage for Template:Election table. It contains usage information, categories and other content that is not part of the original template page. |
Usage
This template marks the beginning of a table and defines borders, margins, background colours, and text alignment within the table. (Default alignment is "right", others must be specified.) Table rows and cells are written as usual, and the table is closed with "|}"
For example, to have a table as shown below, include the code shown to the right:
{{electiontable|Table template pagename}}
'''Summary of [[Mars|Martian]] election results,
2020'''
|-style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" |Parties
!Votes
!%
!+/-
!Seats
!+/-
|-
| style="background-color:#ff0000;" |
| style="text-align:left;" |The red party
|6042
|45.40
| -4.41
|23
| -2
|-
| style="background-color:#00ff00;" |
| style="text-align:left;" |The green party
|5678
|42.67
| +1.23
|21
|0
|-
| style="background-color:#0000ff;" |
| style="text-align:left;" |Free Mars
|345
|2.59
| +2.59
|1
| +1
|-
| style="background-color:#eeeeee;" |
| style="text-align:left;" |None of the above (unfilled seats)
|1242
|9.33
| +.59
|5
| +1
|-style="background:#E9E9E9;"
! colspan="2" style="text-align:left;" |Total
!13307
!align="center" colspan="2"|100%
!align="center" colspan="2"|50
|}
|
| Parties | Votes | % | +/- | Seats | +/- | |
|---|---|---|---|---|---|---|
| The red party | 6042 | 45.40 | -4.41 | 23 | -2 | |
| The green party | 5678 | 42.67 | +1.23 | 21 | 0 | |
| Free Mars | 345 | 2.59 | +2.59 | 1 | +1 | |
| None of the above (unfilled seats) | 1242 | 9.33 | +.59 | 5 | +1 | |
| Total | 13307 | 100% | 50 | |||
Options
Instead of {{electiontable|template pagename}} '''Title''' you can use {{electiontable|template pagename|Title}}
To add class="sortable", use ...|sortable=yes}}. If you use this, you will need to edit your table to have |- class="sortbottom" as the row separator for the total row. If you want a specific column not to be sortable, specify class="unsortable" in the attributes of its header cell. Sorted tables do not currently work with tables using colspan. See Help:Sorting for more information about sorting.
To align the table on the right side of the page, use ...|align=right}}.
To suppress the editlink, use ...|editlink=no}}.
To collapse the table, use ...|collapsed=yes