Template:Prettytable: Difference between revisions
Jump to navigation
Jump to search
m (does the left-margin more appropriately.) |
(Documentation.) |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 1: | Line 1: | ||
border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 1em; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; {{{1| }}}" |
border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 1em; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; {{{1| }}}"<noinclude> |
||
== Usage == |
|||
{| width="100%" |
|||
|- |
|||
| width="50%" |<pre> |
|||
{| {{prettytable}} |
|||
|- |
|||
| cell 1 |
|||
| cell 2 |
|||
|- |
|||
| cell 3 |
|||
| cell 4 |
|||
|} |
|||
</pre> |
|||
| width="50%" | |
|||
{| border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 1em; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse;" |
|||
|- |
|||
| cell 1 |
|||
| cell 2 |
|||
|- |
|||
| cell 3 |
|||
| cell 4 |
|||
|} |
|||
|} |
|||
Additional style rules can be added as an optional parameter: |
|||
{| width="100%" |
|||
|- |
|||
| width="50%" |<pre> |
|||
{| {{prettytable|background: #FFF5FA; font-weight: bold;}} |
|||
|- |
|||
| cell 1 |
|||
| cell 2 |
|||
|- |
|||
| cell 3 |
|||
| cell 4 |
|||
|} |
|||
</pre> |
|||
| width="50%" | |
|||
{| border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 1em; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; background: #FFF5FA; font-weight: bold;" |
|||
|- |
|||
| cell 1 |
|||
| cell 2 |
|||
|- |
|||
| cell 3 |
|||
| cell 4 |
|||
|} |
|||
|} |
|||
This template should not be used for sortable tables (class="wikitable sortable") as it will be overridden by the default sortable style. |
|||
[[Category:CSS templates]] |
|||
</noinclude> |
|||
Latest revision as of 19:20, 17 February 2016
border="2" cellpadding="4" cellspacing="0" style="margin: 1em 1em 1em 1em; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; "
Usage
{| {{prettytable}}
|-
| cell 1
| cell 2
|-
| cell 3
| cell 4
|}
|
|
Additional style rules can be added as an optional parameter:
{| {{prettytable|background: #FFF5FA; font-weight: bold;}}
|-
| cell 1
| cell 2
|-
| cell 3
| cell 4
|}
|
|
This template should not be used for sortable tables (class="wikitable sortable") as it will be overridden by the default sortable style.