Changes

Help:Tables

1,824 bytes added, 21:35, 3 April 2007
Added section on Classes, which is what most people should use for tables anyhow.
! RH 3 || ||
|}
==Classes==
The CSS files on UESP provide several pre-formatted classes to make various tables. These are a quick way to get nice looking tables without needing to learn what all those other features do. The most commonly used ones are "wikitable", "greylapse", and "toc". In order to use them, add the parameter <code>class='''class'''</code> after the <code>{|</code> line in the wiki. Examples:
 
{|
|-valign=top
|
<nowiki>{|</nowiki>
<nowiki>!Header 1!!Header 2</nowiki>
<nowiki>|-</nowiki>
<nowiki>|abcde||fghij</nowiki>
<nowiki>|-</nowiki>
<nowiki>|klmno||pqrst</nowiki>
<nowiki>|}</nowiki>
|
<nowiki>{| class=wikitable</nowiki>
<nowiki>!Header 1!!Header 2</nowiki>
<nowiki>|-</nowiki>
<nowiki>|abcde||fghij</nowiki>
<nowiki>|-</nowiki>
<nowiki>|klmno||pqrst</nowiki>
<nowiki>|}</nowiki>
|
<nowiki>{| class=greylapse</nowiki>
<nowiki>!Header 1!!Header 2</nowiki>
<nowiki>|-</nowiki>
<nowiki>|abcde||fghij</nowiki>
<nowiki>|-</nowiki>
<nowiki>|klmno||pqrst</nowiki>
<nowiki>|}</nowiki>
|
<nowiki>{| class=toc</nowiki>
<nowiki>!Header 1!!Header 2</nowiki>
<nowiki>|-</nowiki>
<nowiki>|abcde||fghij</nowiki>
<nowiki>|-</nowiki>
<nowiki>|klmno||pqrst</nowiki>
<nowiki>|}</nowiki>
|-
|
{|
!Header 1!!Header 2
|-
|abcde||fghij
|-
|klmno||pqrst
|}
|
{| class=wikitable
!Header 1!!Header 2
|-
|abcde||fghij
|-
|klmno||pqrst
|}
|
{| class=greylapse
!Header 1!!Header 2
|-
|abcde||fghij
|-
|klmno||pqrst
|}
|
{| class=toc
!Header 1!!Header 2
|-
|abcde||fghij
|-
|klmno||pqrst
|}
|}
The "wikitable" clsss is generally the preferred format for most charts, though "greylapse" is also acceptable in cases where space is a premium, as it uses slightly less space. The "toc" class is usually reserved for creating a custom Table of Contents on pages where the default Table of Contents is not wanted.