This is TikiWiki v1.9.10.1 -Sirius- © 2002–2007 by the Tiki community Thu 09 of Sep, 2010 [04:39 UTC]
Menu [hide]

How to Create Tables in Pages

print
Contents


Creating Tables

Tables are often needed for organizing information. TikiWiki has a simple syntax for defining a table. Each row in the text box creates one row in the table. Within each row, use one pipe symbol (|, above the \ on most PC keyboards) to separate table columns. Start and end the table with two pipes, like this:

||Sample Table
row1-col1|row1-col2|row1-col3
row2-col1|row2-col2|row2-col3||

to produce:

Sample Table
row1-col1row1-col2row1-col3
row2-col1row2-col2row2-col3


Notice that the first row only has one column, and the rest have three. Just build the table with one row of text per row of table.

Line Breaks


If you need to have multiple rows in a single cell of a table, use three percent signs to create line breaks, like this:

||Sample Table
row1-col1|row1-col2%%%second line%%%third line|row1-col3
row2-col1|row2-col2|row2-col3%%%second line||

produces:

Sample Table
row1-col1row1-col2
second line
third line
row1-col3
row2-col1row2-col2row2-col3
second line


Centering Table Text


To center any text, including text in a table, use two colons before and two colons after:

::This text is centered.::

produces:

This text is centered.


||::Sample Table::
row1-col1|row1-col2
row2-col1|row2-col2||

produces:

Sample Table
row1-col1row1-col2
row2-col1row2-col2


Centered Tables


To center a table itself, the structure gets a bit more complicated, because browsers don't follow the same rules. What works for one browser will not work in another. To insert a simple table centered, use this:

{BOX(align=>center)}||row1-col1|row1-col2
row2-col1|row2-col2||{BOX}

to produce:

row1-col1row1-col2
row2-col1row2-col2


At this time, both the box and the table have a border; this should be corrected in a future release, or else tables will allow an align property.

Right-Aligned Tables


If you need to right-align a table itself, you must use a DIV structure, and you must use both the align and float commands, or IE users won't see it aligned correctly. Use this:

{DIV(class=>class, type=>div, align=>right, float=>right)}||::Sample Table::
row1-col1|row1-col2
row2-col1|row2-col2||{DIV}

to produce:
Sample Table
row1-col1row1-col2
row2-col1row2-col2





Created by: BrianGroover last modification: Thursday 13 of March, 2008 [14:30:37 UTC] by BrianGroover


Pages & Users
280 Users
487 Content Pages

Powered by Tikiwiki Powered by PHP Powered by Smarty Powered by ADOdb Made with CSS Powered by RDF