KKnd   PmWikiZhCnUtf8 /
SimpleTablesII
SearchWiki
PmWikiZhCnUtf8.最近改变
编辑页面
页面修正

Formatting tables

Optional, the first line of the table markup may contain certain table formatting such as border, width, alignment, bgcolor, cellpadding and cellspacing. Width may be specified in percent or in pixels. Colors may be specified either as named colors or HTML codes. Cellpadding is the space between cell contents and the sides of the cell; cellspacing is the space between cells.

Example 1. Changing border and alignment.

This markup:

    || border=10 align=center
    || cell 1 || cell 2 || cell 3 ||
    || cell 1 || cell 2 || cell 3 ||
creates this table:

cell 1 cell 2 cell 3
cell 1 cell 2 cell 3

Example 2. Changing color.

This markup:

    || border=1 bgcolor=red align=center
    || cell 1 || cell 2 || cell 3 ||
    || cell 1 || cell 2 || cell 3 ||
creates this table:

cell 1 cell 2 cell 3
cell 1 cell 2 cell 3

Example 3. Changing width with percent.

This markup:

    || border=1 width=100% bgcolor=yellow
    || cell 1 || cell 2 || cell 3 ||
    || cell 1 || cell 2 || cell 3 ||
creates this table:

cell 1 cell 2 cell 3
cell 1 cell 2 cell 3

Example 4. Changing width with pixels and color with HTML.

This markup:

    || border=1 width=350 bgcolor=#CCCCCC align=center
    || cell 1 || cell 2 || cell 3 ||
    || cell 1 || cell 2 || cell 3 ||
creates this table:

cell 1 cell 2 cell 3
cell 1 cell 2 cell 3

Example 5. Changing cellpadding.

This markup:

    || border=1 width=350 cellpadding=10 align=center
    || cell 1 || cell 2 || cell 3 ||
    || cell 1 || cell 2 || cell 3 ||
creates this table:

cell 1 cell 2 cell 3
cell 1 cell 2 cell 3

Example 6. Changing cellspacing.

This markup:

    || border=1 width=350 cellspacing=10 align=center
    || cell 1 || cell 2 || cell 3 ||
    || cell 1 || cell 2 || cell 3 ||
creates this table:

cell 1 cell 2 cell 3
cell 1 cell 2 cell 3

TODO: Need to document [[cell]] and [[cellnr]] table markups.

<< | PmWiki.DocumentationIndex | >>


编辑页面 - 页面修正 - WikiHelp - SearchWiki - 最近改变 - Printable Version
页面最后更新于 30 四月, 2003, 时间 05:40

©
copyleft by [email protected]
or
[email protected]