Table Style Examples: Difference between revisions
From Xen
Jump to navigationJump to search
Lars.kurth (talk | contribs) |
Lars.kurth (talk | contribs) |
||
(6 intermediate revisions by the same user not shown) | |||
Line 53: | Line 53: | ||
|} |
|} |
||
<br> |
|||
{| class="shadedtable" |
{| class="shadedtable" |
||
|- |
|- |
||
! Fruit |
! Fruit |
||
! Price |
|||
|- |
|- |
||
! Pears |
! Pears |
||
| £1.15 |
|||
|- |
|- |
||
! Apples |
! Apples |
||
| £0.95 |
|||
|- |
|- |
||
! Oranges |
! Oranges |
||
| £0.85 |
|||
|} |
|} |
||
<br> |
<br> |
||
== class <em>shadedtable2</em> == |
|||
{| class="shadedtable2" |
|||
!colspan="6"|Shopping List |
|||
|- |
|||
|rowspan="2"|Bread & Butter |
|||
|Pie |
|||
|Buns |
|||
|Danish |
|||
|colspan="2"|Croissant |
|||
|- |
|||
|Cheese |
|||
|colspan="2"|Ice cream |
|||
|Butter |
|||
|Yogurt |
|||
|} |
|||
<br> |
|||
{| class="shadedtable2" |
|||
|- |
|||
! Fruit |
|||
! Price |
|||
|- |
|||
! Pears |
|||
| £1.15 |
|||
|- |
|||
! Apples |
|||
| £0.95 |
|||
|- |
|||
! Oranges |
|||
| £0.85 |
|||
|} |
|||
<br> |
|||
== class <em>wikitable</em> == |
== class <em>wikitable</em> == |
||
{| class="wikitable" |
{| class="wikitable" |
||
Line 81: | Line 121: | ||
|} |
|} |
||
<br> |
|||
{| class="wikitable" |
{| class="wikitable" |
||
|- |
|- |
||
! Fruit |
! Fruit |
||
! Price |
|||
|- |
|- |
||
! Pears |
! Pears |
||
| £1.15 |
|||
|- |
|- |
||
! Apples |
! Apples |
||
| £0.95 |
|||
|- |
|- |
||
! Oranges |
! Oranges |
||
| £0.85 |
|||
|} |
|} |
||
Line 108: | Line 153: | ||
|Yogurt |
|Yogurt |
||
|} |
|} |
||
<br> |
|||
{| class="zebra" |
{| class="zebra" |
||
|- |
|- |
||
! Fruit |
! Fruit |
||
! Price |
|||
|- |
|- |
||
! Pears |
! Pears |
||
| £1.15 |
|||
|- |
|- |
||
! Apples |
! Apples |
||
| £0.95 |
|||
|- |
|- |
||
! Oranges |
! Oranges |
||
| £0.85 |
|||
|} |
|} |
||
Line 140: | Line 189: | ||
<br> |
<br> |
||
== class <em>sortable</em> == |
== class <em>sortable</em> == |
||
Make a table sortable. |
Make a table sortable by '''clicking on the header'''. |
||
<pre> |
<pre> |
||
{| class="prettytable sortable" |
{| class="prettytable sortable" |
||
Line 146: | Line 195: | ||
</pre> |
</pre> |
||
Note that in order for the {{Sortable}} icon to be shown, you need to add |
|||
<pre> |
|||
{| class="prettytable sortable" |
|||
|- |
|||
! Fruit {{Sortable}} !! Price {{Sortable}} |
|||
</pre> |
|||
'''Example:''' |
'''Example:''' |
||
Line 151: | Line 207: | ||
{| class="prettytable sortable" |
{| class="prettytable sortable" |
||
|- |
|- |
||
! Fruit !! Price |
! Fruit {{Sortable}} !! Price {{Sortable}} |
||
|- |
|- |
||
| Pears || £1.15 |
| Pears || £1.15 |
Latest revision as of 13:17, 8 August 2016
This page contains examples of our table styles
Base Styles
class prettytable
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |
Fruit | Price |
---|---|
Pears | £1.15 |
Apples | £0.95 |
Oranges | £0.85 |
class shadedtable
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |
Fruit | Price |
---|---|
Pears | £1.15 |
Apples | £0.95 |
Oranges | £0.85 |
class shadedtable2
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |
Fruit | Price |
---|---|
Pears | £1.15 |
Apples | £0.95 |
Oranges | £0.85 |
class wikitable
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |
Fruit | Price |
---|---|
Pears | £1.15 |
Apples | £0.95 |
Oranges | £0.85 |
class zebra
Shopping List | |||||
---|---|---|---|---|---|
Bread & Butter | Pie | Buns | Danish | Croissant | |
Cheese | Ice cream | Butter | Yogurt |
Fruit | Price |
---|---|
Pears | £1.15 |
Apples | £0.95 |
Oranges | £0.85 |
Modifiers
These are table classes that modify an existing table classes behavior.
class fullwidth
Make a table the size of the page.
{| class="zebra fullwidth" ...
Example:
Fruit | Price |
---|---|
Apples | £0.95 |
class sortable
Make a table sortable by clicking on the header.
{| class="prettytable sortable" ...
Note that in order for the icon to be shown, you need to add
{| class="prettytable sortable" |- ! Fruit {{Sortable}} !! Price {{Sortable}}
Example:
Fruit | Price |
---|---|
Pears | £1.15 |
Apples | £0.95 |
Oranges | £0.85 |