Template:Diagonal split header
This template simulates a table header cell split diagonally, a device often used to compactly label headers of rows and columns, as in this example:
Handed- ness Sex |
Right-handed | Left-handed | Total |
---|---|---|---|
Male | 43 | 9 | 52 |
Female | 44 | 4 | 48 |
Total | 87 | 13 | 100 |
To use it, create a header cell using !
followed by {{diagonal split header|HEADER-OF-ROW-HEADERS|HEADER-OF-COLUMN-HEADERS}}
.
As the effect is achieved by drawing a diagonal line across the cell, the two headers are still part of the same cell and can easily overrun the line. A remedy is to pad the headers horizontally with
and vertically with <br />
as in the example above. The template user is responsible for checking that it does not overrun on common Web browsers.
The template is compatible with cells using colspan or rowspan, in which case place the colspan/rowspan attribute between !
and {{diagonal split header …}}
:
H θ |
5′ 7″ | 5′ 10″ | 6′ 1″ | |
---|---|---|---|---|
67″ | 70″ | 73″ | ||
0 | 0° | ✓ | ✗ | ✘ |
π/2 | 90° | ✔ | ✗ | ✘ |
π | 180° | ✔ | ✔ | ✓ |