Difference between revisions of "Template:Election table/doc"

From blackwiki
Jump to navigation Jump to search
imported>Sardanaphalus
(updating category)
(That's no way to spell it!)
Line 7: Line 7:
 
{| align="right" style="margin:0 0 1em 2em;"
 
{| align="right" style="margin:0 0 1em 2em;"
 
|<small><pre>{{electiontable|Table template pagename}}
 
|<small><pre>{{electiontable|Table template pagename}}
'''Summary of [[Mars]]ian election results, [[2005]]'''
+
'''Summary of [[Mars|Martian]] election results, [[2005]]'''
 
|-style="background:#E9E9E9;"
 
|-style="background:#E9E9E9;"
 
! align="left"|Parties
 
! align="left"|Parties
Line 44: Line 44:
 
|}
 
|}
  
{{electiontable|Table template pagename}}'''Summary of [[Mars]]ian election results, [[2005]]'''
+
{{electiontable|Table template pagename}}'''Summary of [[Mars|Martian]] election results, [[2005]]'''
 
|-style="background:#E9E9E9;"
 
|-style="background:#E9E9E9;"
 
! align="left"|Parties
 
! align="left"|Parties

Revision as of 20:17, 21 June 2008

Template:Template doc page viewed directly

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, [[2005]]'''
|-style="background:#E9E9E9;"
! align="left"|Parties
! Votes
! %
! +/-
! Seats
! +/-
|-
| align="left"|The Green Party
| 123,456
| 79.2
| -8.3
| 53
| -8
|-
| align="left"|The Red Party
| 23,697
| 15.2
| +6.6
| 10
| +4
|-
| align="left"|The Sun-Followers' Party
| 8,730
| 5.6
| +1.7
| 4
| +4
|-style="background:#E9E9E9;"
! align="left"|Total
! 155,883
! align="center" colspan="2"|100%
! align="center" colspan="2"|67
|}
[{{fullurl:Template:Transclude|action=edit}} e] • [[|d]] Summary of Martian election results, 2005
Parties Votes % +/- Seats +/-
The Green Party 123,456 79.2 -8.3 53 -8
The Red Party 23,697 15.2 +6.6 10 +4
The Sun-Followers' Party 8,730 5.6 +1.7 4 +4
Total 155,883 100% 67