Template:DefTable
From PWI Wiki
style="background:#171513; padding: 2px 2px;" border="1" cellpadding="4"
This is a default table header (deftable) for use in standard tables to provide a uniform look and to make it easier to update all/most tables simultaneously should the wiki's style (CSS) be updated again.
The DefTable template includes the following parameters:
- bkg - The table's background color, defaults to #171513.
- padwid - The width of the padding on the left and right sides of the table, defaults to 2.
- padhgt - The height of the padding on the top and bottom of the table, defaults to 2.
- bdrwid - The width of the line around the table, defaults to 1.
- cellpad - The width of the padding between the text and the sides of the table, defaults to 4.
This template can be used as in the following example:
{| {{DefTable}}
|+ '''Example Table'''
|-
! Column
! Headers
|-
! Row 1
| Example A
|-
! Row 2
| Example B
|}
Which produces the following table:
| Column | Headers |
|---|---|
| Row 1 | Example A |
| Row 2 | Example B |
Or it can be used with parameters like this:
{| {{DefTable|bkg=#000000|bdrwid=0|cellpad=10}}
|+ '''Example Table'''
|-
! Column
! Headers
|-
! Row 1
| Example A
|-
! Row 2
| Example B
|}
Which produces the following table:
| Column | Headers |
|---|---|
| Row 1 | Example A |
| Row 2 | Example B |