Bản mẫu:Diagonal split header

Tài liệu bản mẫu[xem] [sửa] [lịch sử] [làm mới]

Cách sử dụng

sửa

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:

  Thuận
tay
  Giới tính
Tay
phải
Tay
trái
Tổng cộng
Nam 43 9 52
Nữ 44 4 48
Tổng cộng 87 13 100

To use it, create a header cell using ! followed by {{diagonal split header|NATURE-OF-ROW-HEADERS|NATURE-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 with   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 collapsible (but not sortable, as the sort arrows are not drawn) tables, and cells using colspan or rowspan, in which case place the colspan/rowspan attribute between ! and {{diagonal split header …}}:

T
θ
2015 2016
Thg11 Thg12 Thg1
0
π/2 90°
π 180°