Changes

Help:Tables

341 bytes added, 00:55, 8 January 2008
Options: adding centered, vmid options; deleting now-redundant valign=top tags
 
{|
|-
|-valign=top
|
<nowiki>{| class=wikitable</nowiki>
|}
 
Additional classes exist that can be used to provide other formatting details. These classes are designed to be used in conjuction with one of the basic layout classes. For example, <code>class="wikitable vtopvmid compress"</code> (note that the optional classes follow the primary "wikitable" class). The available options are:
* '''<code>centered</code>''': Centers the table horizontally on the page.
* '''<code>compress</code>''': Eliminates all padding and margins to create smaller tables.
* '''<code>vtop</code>''': Sets all cells in the table to have valign=top (i.e., for the content is all aligned vertically at the top of the cell).
* '''<code>firstleft</code>''': First column is left-aligned, the rest of the table is center-aligned.
* '''<code>vtopvmid</code>''': Sets all cells in the table to have valign=topmiddle (i.e., for the content is all aligned vertically atin the topmiddle of the cell).
* '''<code>vtop</code>''': Sets all cells in the table to have valign=top (i.e., the content is all aligned vertically at the top of the cell). This is the default setting for tables, and therefore generally does not need to be used.
 
===Sortable Tables===
 
{| width=100%
|-
|-valign=top
|width=50%|
<nowiki>{| class="wikitable sortable"</nowiki>
You can remove the sort icon from a column by giving the header the "unsortable" class, like so:
{| width=100%
|-
|-valign=top
|width=50%|
<nowiki>
You can also exclude a bottom row from sorting by giving it the "sortbottom" class:
{| width=100%
|-
|-valign=top
|width=50%|
<nowiki>