Contributing: Difference between revisions

Added info on tables
(Manual Review: No Changes. Updating Version.)
(Added info on tables)
Line 26: Line 26:
If you have a bit of text in a page but have more text explaining that concept on another page, it might be a good idea to use the [[Template:Main|Main Template]]. This template adds a formatted link to the main article to the page. It can be seen in action on the [[Beginners Guide]].
If you have a bit of text in a page but have more text explaining that concept on another page, it might be a good idea to use the [[Template:Main|Main Template]]. This template adds a formatted link to the main article to the page. It can be seen in action on the [[Beginners Guide]].


== Tables with Sticky Headers ==
Some of the tables on the wiki have headers which are "sticky", that is they will remain at the top of a table as the user scrolls down. See [[Equipment]] for an example of this. In order to implement this on your tables first add the class "stickyHeader" to the start of the table. E.g:
<code>{| class="wikitable sortable"</code>
would become:
<code>{| class="wikitable sortable stickyHeader"</code>
Before you start your first row of headers you then add <code>|- class="headerRow-0"</code> before it.
If you have a second row of headers you must add <code>|- class="headerRow-1"</code> before it.
As an example:
{| class="wikitable sortable stickyHeader"
|- class="headerRow-0"
! First Column 1
! Second Column 1
! Third Column 1
|- class="headerRow-1"
! First Column 2
! Second Column 2
! Third Column 2
|-
| 1
| 2
| 3
|}
Can be generated with the following wikitext
<pre>{| class="wikitable sortable stickyHeader"
|- class="headerRow-0"
! First Column 1
! Second Column 1
! Third Column 1
|- class="headerRow-1"
! First Column 2
! Second Column 2
! Third Column 2
|-
| 1
| 2
| 3
|}
</pre>


{{Menu}}
{{Menu}}