Help:Editing: Difference between revisions

Xenwolf (talk | contribs)
m Reverted edits by PiotrGrochowski (talk) to last revision by Xenwolf
Tag: Rollback
Xenwolf (talk | contribs)
Tables: +complex examples and suggestions for compacting the wiki text
Line 97: Line 97:
|}
|}


==== Adjusting Text Alignment ====
The table cells are left aligned by default, the heading cells are center aligned. You may change this via inline CSS style definitions:
The table cells are left aligned by default, the heading cells are center aligned. You may change this via inline CSS style definitions:


Line 114: Line 115:
! headline style
! headline style
| exclamation mark instead of the pipe symbol starts the cell
| exclamation mark instead of the pipe symbol starts the cell
|}
If you want to override the default text alignment for all cells, place the inline CSS (for example <code>style="text-align:center;"</code>) directly at the beginning of the table, right after the <code>class="wikitable"</code> statement.
==== External helper tools ====
If you have to construct really complex tables with colspans and rowspans, you may use this online table generator:
[http://www.tablesgenerator.com/mediawiki_tables Generate tables in MediaWiki format - TablesGenerator.com]
For example, this wiki markup
<nowiki>
{| class="wikitable"
! colspan="3" | 1
! 2
! 3
|-
| rowspan="2" | A
| colspan="3" | B
| C
|-
| rowspan="2" colspan="2" | D
| colspan="2" | E
|-
| F
| G
| H
|}
</nowiki>
will be rendered into this table:
{| class="wikitable"
! colspan="3" | 1
! 2
! 3
|-
| rowspan="2" | A
| colspan="3" | B
| C
|-
| rowspan="2" colspan="2" | D
| colspan="2" | E
|-
| F
| G
| H
|}
|}