Template talk:Table alignment

Wikidata
Hi. I've connected the template to the Wikidata. IKhitron (talk) 12:20, 14 December 2022 (UTC)

Is it possible to adapt this template to account for rowspans and/or overriding cell alignments?
I love this template, but I've run into an issue where the use of rowspans makes it malfunction, aligning the cells not by their column, but by their relative position in the row. I notice that the alignment issues go away when the table has been sorted. I understand if this is a permanent limitation, but if so, can this template be changed so that individual cell alignments can be overridden (like on the bottom right cell that should be left-aligned)?

Star Garnet (talk) 10:02, 12 June 2023 (UTC)
 * Yes you have to directly override them with inline styling. (Do not use the align attribute, it is deprecated html)

BTW. It clears up after sorting, because sorting ALSO cannot handle rowspans, so when you first use that, it clones the cells and removes the rowspan. —Th e DJ (talk • contribs) 10:59, 12 June 2023 (UTC)
 * Thanks! I should have realized the template was simply rendering the deprecated form null. Star Garnet (talk) 18:40, 12 June 2023 (UTC)
 * A year later. @Star Garnet, sorry I'm answering just now, but it's the first time I saw you question. Actually, there is a way to fix this problem, without editing each cell. Not in all cases, but in a huge lot of cases, including your example. For some reason this template css sheet includes only the half of the code, I don't know why, but the negative part is missing. I am not going to edit it, because I'm not one of the enwiki tech support, but maybe somebody else can. The relevant code can be found in interwiki links, searching "nth-last-child". IKhitron (talk) 17:34, 2 June 2024 (UTC)

Why can't this functionality be merged into the Wikitable class itself?
Why can't this functionality be merged into the Wikitable class itself? Jorge Stolfi (talk) 13:16, 4 September 2023 (UTC)

Tables with 99 columns
Adding columns up to 99 to the styles in this edit seems excessive. The highest used is 25 at List of largest airlines in Europe. I would be concerned if any table had 99 columns. Jroberson108 (talk) 14:21, 1 June 2024 (UTC)
 * I think you would be safe to go back to 30 for now and it can be expanded later if needed. -- WOSlinker (talk) 16:59, 1 June 2024 (UTC)
 * I agree. Reverted it back to 29 columns. It can be increased as needed. Jroberson108 (talk) 19:00, 1 June 2024 (UTC)