Template talk:Vertical header

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Problem with sortable tables that include "Vert Header" template[edit]

FYI: For some reason if a table is sortable and has "Vert header" then the sorting is broken.

NevilleDNZ (talk) 23:05, 22 June 2017 (UTC)[reply]

    • Fixed... used the stp=1 option.

NevilleDNZ (talk) 23:12, 22 June 2017 (UTC)[reply]

Yes, that's intentional. After tinkering with different positions for the sorting arrows, I decided that no padding should be added to the right side of the cells — only upwards and only if necessary. However, since I can only set inline CSS for these headers, I can't make a simple, universal rule for whether, how and where the arrows are displayed, and there's no other reliable way to tell whether or not a column is supposed to be sortable or not from within the module that powers this template, so the user has to specify it instead. Since the default state of a table is to be unsortable, I set (and reinforced) unsortability as the default, which makes the stp parameter mandatory for sortable columns. I avoided the possibility of having a sortable column without arrows, which would confuse readers. —  Andreyyshore  T  C  13:11, 29 Oct 2018 (UTC) 

Header text readable from top to bottom. Or at an angle[edit]

User:Andreyyshore. Thanks for the template. Would it be possible to have a parameter to make the header text readable from top to bottom like this:

H
e
a
d
e
r

Or maybe like some of the 45 degree slant examples in these articles:

--Timeshifter (talk) 17:32, 14 June 2018 (UTC)[reply]

Two-line
example
You're welcome. writing-mode: vertical-lr; text-orientation: upright would work fine in Chrome for stacked text; I'll have to do some testing when I have more time, as that might affect compatibility with some browsers. Also notice how the first one is "underlined" to the left when you hover over it?nevermind
Maybe slanted headers should be implemented in a separate template/module, but I'll look into it. I imagine this creating huge problems in older versions of IE. —  Andreyyshore  T  C  12:44, 29 Oct 2018 (UTC) 

(unindent). Thanks. I just installed Chrome. It is working in Chrome, but not in Firefox or Explorer. --Timeshifter (talk) 00:18, 30 October 2018 (UTC)[reply]

cellstyle parameter request[edit]

@Andreyyshore: Great template. The current style parameter applies to the div with the text. I would like to also have a cellstyle parameter for the whole cell, e.g. for a background color if a table like 2018 ATP World Tour#Titles won by player is changed to use the template. A style= before the template is ignored because it adds its own style=. Consider the below example where "Singles" does what is currently supported and tries an ignored style=. "Doubles" makes an ugly unstable hack by tagging cellstyling onto va=bottom. I haven't used this hack in practice and don't want to. "Mixed doubles" has the code I would like to produce the same result as "Doubles". I don't know Lua but could probably guess how to do it – or maybe break the module. PrimeHunter (talk) 23:47, 14 July 2018 (UTC)[reply]

Singles
Doubles
Mixed doubles
 
Andreyyshore has added the requested cellstyle parameter. Thanks. PrimeHunter (talk) 11:46, 29 October 2018 (UTC)[reply]
You're welcome. Sorry for taking so long; I was on a wikibreak, only making a few minor contributions lately. —  Andreyyshore  T  C  12:22, 29 Oct 2018 (UTC) 

Tooltip[edit]

I made great use of this template here. Vertical headers are a space saver but a headache to read, though. Notice I used {{h:title}} to give a tooltip on unlinked headers. How about adding a tooltip option to this template/module? (Or even making it default!). Cheers. Guarapiranga (talk) 23:52, 13 November 2019 (UTC)[reply]

Vertical Header Glitching on Mobile Device[edit]

When I look at the 2020 United States Presidential Election table I notice the table glitches. This occurs on my mobile device. The vertical headers appear blank for over 15 seconds. In some cases I have to click on them to get them to appear. It makes it hard to read and it’s annoying. Can someone please resolve this? Pentock (talk) 01:52, 3 September 2020 (UTC)[reply]

References[edit]

Can this template be made to show refs (here, for instance)?

Also, if I add flags there, they show unrotated. What's the best way to circumvent that? Cheers. — 𝐆𝐮𝐚𝐫𝐚𝐩𝐢𝐫𝐚𝐧𝐠𝐚  05:58, 30 June 2021 (UTC)[reply]

Proposal to discourage vertically oriented ("sideways") column headers in tables[edit]

I have initiated a discussion at Wikipedia talk:Manual of Style/Tables#Proposal to discourage vertically oriented ("sideways") column headers, to may interest contributors to this article. 𝕁𝕄𝔽 (talk) 17:15, 6 December 2023 (UTC)[reply]