Template:Vertical header/doc
This is a documentation subpage for Template:Vertical header. It contains usage information, categories and other content that is not part of the original template page. |
Regular column
|
Vertical value column
|
Thin gold column
|
Unsortable column
|
---|---|---|---|
0 | 1 |
1 | 2 |
3 | 5 |
8 | 13 |
Regular column
|
Vertical value column
|
Thin gold column
|
Unsortable column
|
This is a template that helps create vertically oriented column headers in tables. It even works for sortable columns.
Although this template was made with table headers in mind, it can work with regular cells as well.
If the header cells have other attributes, for example, colspan
or rowspan
, there must be no vertical bar |
between the attributes and the template call.
Parameter list[edit]
-
– The desired text; can contain wikilinks (1
). You can escape the equals sign either by using[[]]
{{=}}
or by explicitly mentioning the
parameter.1=
-
– Give any non-empty value in order to apply anb
{{nobold}}
template to the text. -
– Vertical alignment (va
,bottom
,top
). Default ismiddle
.bottom
-
– Give any non-empty value in order to apply a top padding to the cell (useful if the header is bottom-aligned; required for sortable columns).stp
-
– Manual width; override the default value, which was automatically generated based on the number of line breaks (you can usemw
,<br>
or any other combination).<BR />
-
– Additional styles for thestyle
containing the rotated text. May contain double quotes.<div/>
-
– Additional styles for the entire cell. May contain double quotes. Use this instead of the cell'scellstyle
attribute. Usestyle
instead ofbackground-color
if you need it for the header of a sortable column.background
Examples[edit]
-
– basic example! {{vert header|Your text here}}
-
– produces an explicitly sortable, no-bold, sortable header! {{vert header|nb=1|stp=1|Your text here}}
-
– produces an unsortable, top-aligned table header! {{vert header|va=top|Your text here}}
-
– produces an unsortable header spanning two columns, with a gold background; use no vertical bar after! colspan="2" {{vert header|cellstyle=background-color:gold|Your text here}}
colspan
You can also use the
shorthand.
! {{verth|Your text here}}
An example below (from Help:Sorting) with headers that span rows or columns (using rowspan and colspan). Note that there is no vertical bar
between |
and rowspan=2
{{vert header...}}
|
{| class="wikitable sortable" |- ! rowspan=2 {{vert header|stp=1|name}} ! colspan=2 {{vert header|data columns}} ! rowspan=2 {{vert header|stp=1|another column}} |- ! {{vert header|stp=1|data}} ! {{vert header|stp=1|more data}} |- | cats | 273 | 53 | 1 |- | dogs | 65 | 8,492 | 2 |- | mice | 1,649 | 548 | 3 |} |
Compatibility[edit]
The following browsers have been tested on combinations of Debian 6.0, Mac OS X 10.8, Ubuntu 9.10, Ubuntu 15.04, Windows 7, Windows Server 2008 R2 and Windows 10. The earliest version known to work is highlighted in green. The latest tested configuration that did not work is highlighted in red.
Arora | Chrome | Dillo | Edge | Epiphany | Firefox | Iceape | Iceweasel | IE | Konqueror | Luakit | Midori | Opera | Rekonq | Safari | SeaMonkey |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0.11 Template:Font |
9 Template:Font |
3.0.4 Template:Font |
38 Template:Font |
3.4.2 Template:Font |
43 Template:Font |
2.7.12 Template:Font |
38.6 Template:Font |
11 Template:Font |
4.14 Template:Font |
039e319 Template:Font |
0.4.3 Template:Font |
15 Template:Font |
1.1 Template:Font |
9.1 Template:Font |
2.46 Template:Font |
Deb 6 | Win 7 | Ubu 15.04 | Win 10 | Deb 6 | OS X 10.8 | Deb 6 | Deb 6 | Win 10 | Ubu 15.04 | Ubu 15.04 | Ubu 15.04 | Win 2008 R2 | Ubu 9.10 | OS X 10.8 | Ubu 15.04 |
- Should theoretically work on the following browsers as well (please confirm):
Android Browser |
Chrome | Edge | Firefox | Safari |
---|---|---|---|---|
3 Template:Font |
8 Template:Font |
20 Template:Font |
41 Template:Font |
5.1 Template:Font |
- Notes:
- In Internet Explorer 5–10, the text goes from top to bottom instead of going from bottom to top.
- Firefox support for vertical text and rotation began in version 25, but it was unstable until version 43, or possibly 41.
See also[edit]
- {{Rotate text}}