Template:Table

From xat wiki
Jump to: navigation, search


This is an advanced template with the purpose of creating a box with up to 3 levels of border.

Border attributes:

  • borderwidth - sets the width of the inner border in pixels
  • bordercolor - sets the color of the inner border
  • borderradius - sets the radius of the inner border in pixels
    • border2width - sets the width of the middle border in pixels
    • border2color - sets the color of the middle border
    • border2radius - sets the radius of the middle border in pixels
      • border3width - sets the width of the outer border in pixels
      • border3color - sets the color of the outer border
      • border3radius - sets the radius of the outer border in pixels
  • tablewidth - sets the width of the table in pixels
  • bg - sets the background of the table (defaults to white)
  • text - content

Notes:

Second and third borders are optional an do not have to be included

This table includes one big cell with a white background, to divide the cell you may include another table in it, but make sure not to use table defining symbols directly, but their template counterparts, as pipes will conflict with the template separators.

So:

  • Instead of {| use {{(!}}
  • Instead of |- use {{!-}}
  • Instead of | use {{!}}
  • Instead of |} use {{!)}}

For example:

{{Table
 |borderwidth=3
 |bordercolor=#7ab9ff
 |border2width=3
 |border2color=#4e9ff9
 |tablewidth=500
 |bg=#aed4ff
 |text=
 {{(!}} style="width:100%"
 {{!}}first cell
 {{!}}second cell
 {{!)}}
 }}

Will produce:

first cell second cell