Jump to content

Help talk:Table

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
(Redirected from Help talk:Advanced table features)
Latest comment: 2 months ago by Timeshifter in topic Making two table the same layout?


Notes in collapsed table for 2025 Moldovan parliamentary election opinion polls

[edit]

Note: Moved from User talk:Timeshifter.

Hello, surely you remember your edits at 2025 Moldovan parliamentary election#Opinion polls, you made the table collapsible with some sticky sections (not sure how to call them, but you get what I mean I think), which was a great improvement. The table has +30 notes and was bloating the bottom of the article, so I thought it'd be a good idea to have the notes on a collapsible list within the table itself. I've done this but I thought it'd be nice if the note section at the bottom was also sticky, I couldn't figure out how. I'd greatly appreciate help for this (or if you can tell me that this is not technically possible). If it's not technically possible, maybe a better way could be to have a collapsible list right below but outside of the table. Also, I am not sure why are the notes now in italics, so if you could also help me remove that. Thanks in advance, Super Ψ Dro 09:56, 11 October 2025 (UTC)Reply

@Super Dromaeosaurus: This is complicated enough that the discussion may help update stuff on the table help pages. So I moved the discussion here. Also, I may not have much time to help. So others may help here. --Timeshifter (talk) 17:07, 11 October 2025 (UTC)Reply
@Super Dromaeosaurus: I think I fixed it. See this version:
https://en.wikipedia.org/w/index.php?title=2025_Moldovan_parliamentary_election&oldid=1317366870#Opinion_polls
--Timeshifter (talk) 19:12, 17 October 2025 (UTC)Reply
@Super Dromaeosaurus: Oops. I think that version violates Wikipedia:Manual of Style#Scrolling lists and collapsible content and Wikipedia:Accessibility guidelines. Because the notes are in a fully collapsed table.
Template:Collapse top says it can only be used on talk pages if fully collapsed. So I moved the notes to the bottom of the table. As part of the partially collapsed table via Template:Sticky table start. See this version:
https://en.wikipedia.org/w/index.php?title=2025_Moldovan_parliamentary_election&oldid=1317371005#Opinion_polls
I am still not sure if this is OK. Maybe Jroberson108 and others know. --Timeshifter (talk) 19:40, 17 October 2025 (UTC)Reply
Thanks for trying, I think the ideal version would be the current one but if we could make the notes section visible at all times in the table without having to scroll down to the bottom to see them, like the abbreviations of parties and their colors are visible at all times. If this is even possible. Super Ψ Dro 23:51, 17 October 2025 (UTC)Reply

Here is another version:

The notes are in a separate scrolling div below the table:

<div style="height:20em; overflow:auto; border:2px solid;">
:'''Notes:'''
{{notelist}}
</div>

See: Help:Advanced table features#Scrolling tables --Timeshifter (talk) 02:21, 18 October 2025 (UTC)Reply

Putting the notes under the table in the scrollable area or under the table's scrollable area, both seem fine, but they give different user experiences. Clicking on the note's link, you lose your reading place on the former because you jump down inside the scrollable area, but with the latter you don't lose your place since you jump below the table's scrollable area. In both cases, you can still read the note if you hover over it with your mouse when the notes are off screen. Seems like the latter would be the better user experience. Jroberson108 (talk) 05:19, 18 October 2025 (UTC)Reply
@Jroberson108: Interesting. One can click the back arrow to get back to the exact same spot in the table. For example, deep in the "Others" column where there are a lot of notes.
I couldn't get height to work via percent: height:70%;
Is there a way to make the height of the scrolling window be a percentage of the available screen height. Preferably the available screen inside Windows toolbars, tab bars, etc..
Also, does this method violate any guideline or policy? I assume not since the sticky table is inside a scrolling window, too. Maybe Graham87 can tell us if the notes are accessible to him in our preferred version:
https://en.wikipedia.org/w/index.php?title=2025_Moldovan_parliamentary_election&oldid=1317427765#Opinion_polls
Graham, some of the table headers have notes that show upon hovering, or via clicking. The first column head with a note is "PRIM".
--Timeshifter (talk) 19:09, 18 October 2025 (UTC)Reply
@Timeshifter: Change "%" to "vh". 70vh represents 70% of the viewport's height. Be sure to test on mobile landscape orientation where there isn't much height. A scrolling area doesn't use display: none; to hide the content, so screen readers should be able to read the content. Jroberson108 (talk) 20:06, 18 October 2025 (UTC)Reply
@Timeshifter: Yes, the footnotes that need to be clicked (the ones with the letters) work fine with my screen reader. Anything that requires just hovering won't work for me. Graham87 (talk) 20:54, 18 October 2025 (UTC)Reply

Thanks Graham87 and Jroberson108. I used height:70vh; in the notes window. It looks fine in my iPhone SE 2020 in Chrome. Same vertical height as the sticky table window.

Super Dromaeosaurus. I changed the line height from 14px to 17px because the numbers were overlapping each other in my cell phone.

The font size you are using for the smaller numbers violates a guideline that no article fonts should ever be below 85% of the regular article font size. See:

The reason this is happening is because 85% of 90% (the table font size) is 76.5%. --Timeshifter (talk) 02:32, 19 October 2025 (UTC)Reply

@Timeshifter: If you are trying to match the sticky table scrollable area height, it uses 75vh. Jroberson108 (talk) 02:44, 19 October 2025 (UTC)Reply
OK. I think I will keep it at 70vh. Others may change it. SuperDro has the notes font size at 85%, and it is easy to read them since they aren't in table columns, and don't require complicated scrolling. So it isn't necessary to push for a taller window as with tables and all their problems in mobile landscape view. Here is the 70vh version:
https://en.wikipedia.org/w/index.php?title=2025_Moldovan_parliamentary_election&oldid=1317618873#Opinion_polls
--Timeshifter (talk) 02:51, 19 October 2025 (UTC)Reply
Why would you use px? It does not appear that the table contains images. It seems to me that some number of em would be more appropriate, so the display responds to the user's current font size. I don't see, however, the necessity of even specifying line-height; why do you think you need that? — JohnFromPinckney (talk / edits) 08:22, 20 October 2025 (UTC)Reply
Line height was already there. I just increased it. Others will have to decide whether it is needed at all.
Pixels? Where are they being used?
--Timeshifter (talk) 23:01, 20 October 2025 (UTC)Reply
I have now edited that page. I removed the line-height:17px; as well as the unhelpful style="width:35px;" constraints.
Pixels? Where are they being used? In your own post (I changed the line height from 14px to 17px), and (until a moment ago) in the cited page. And I wouldn't say they are being "used", which is why I removed them; they are unnecessary, unhelpful, and misleading. — JohnFromPinckney (talk / edits) 10:48, 21 October 2025 (UTC)Reply

Oops, brain fart on the line-height pixels. I agree about the column widths being unnecessary. I think though that the line height is unnecessarily tall. Maybe you, SuperDro, or somebody else can narrow the line height with em units. --Timeshifter (talk) 14:36, 21 October 2025 (UTC)Reply

I lessened the line height with this in the table styling wikitext:
style="line-height:0.95;"
It makes for tighter rows with text touching text below only rarely. On desktop monitors and in my iPhone SE 2020 in Chrome.
See: https://developer.mozilla.org/en-US/docs/Web/CSS/line-height
See this version:
https://en.wikipedia.org/w/index.php?title=2025_Moldovan_parliamentary_election&oldid=1319381002
Compare the table (by itself) with and without line height adjustment:
User:Timeshifter/Sandbox301.
--Timeshifter (talk) 09:15, 31 October 2025 (UTC)Reply

Colors

[edit]

Hi all, it took me quite some effort to determine how to change background color of a cell or complete table. It appears that one cannot use html color coding, like f3f3f3, but one should use (in this case), background-color:WhiteSmoke. Can this be added to the page, including a list to a conversion from html into these textual codes? I wanted to use the background color of an image for the complete table. Thanks, Ellywa (talk) 15:54, 18 December 2025 (UTC)Reply

It's working for me. For all table cells, or a single table cell.
I am viewing in dark mode.
style=background-color:#f3f3f3;
Caption text
Header text Header text Header text
Example Example Example
Example Example test
Example Example Example
Caption text
Header text Header text Header text
Example Example Example
Example Example Example
Example Example Example
I wonder where the "caption text" disappeared to in the 2nd table.
--Timeshifter (talk) 17:17, 18 December 2025 (UTC)Reply
@Ellywa: When you specify a colour as a RGB hex triplet (see CSS Color Module Level 3) the hash character (#) is nowadays mandatory. It has always been mandatory for such values when specified in a CSS declaration such as <table style="background-color:#f3f3f3">.
Now for the historical context: prior to HTML 4.0 (December 1997), colour in HTML documents was specified using the BGCOLOR=, TEXT=, LINK=, VLINK= and ALINK= attributes of the <BODY> tag, and the COLOR= attribute of the <FONT> tag. Some browsers also recognised the BGCOLOR= attribute (but not the others) with <TABLE>, <TR>, <TH> and <TD>. When these attributes were used to specify a colour as an RGB hex triplet, many browsers allowed the hash character to be omitted, e.g. <TABLE BGCOLOR=F3F3F3>. All of these techniques were deprecated in HTML 4.0 and declared obsolete in HTML 5.0, and therefore must not be relied upon.
With all that said, the MediaWiki software does permit all of these obsolete techniques to be used, they are not sanitised in any way except for placing double quotes around any unquoted attribute values (so e.g. {| bgcolor=f3f3f3 emits <table bgcolor="f3f3f3">) and therefore the obsolete form is served to the client, and the end result may still work as intended - but only for browsers that recognise these older techniques, not necessarily for all browsers. --Redrose64 🌹 (talk) 12:22, 21 December 2025 (UTC)Reply
thank you sooooo much @Redrose64 and @Timeshifter, indeed I am rather an oldie. This is a tremendous help. Ellywa (talk) 13:16, 21 December 2025 (UTC)Reply

Table of contents

[edit]

Recently this site has changed its useful TOC to a useless blob on the side of the page. if not open perminally or having to chick a link to open temporarily it is evil and useless godanov (talk) 14:08, 23 December 2025 (UTC)Reply

@Godanov: See Special:Preferences#mw-prefsection-rendering. You might try Vector legacy (2010). It has a different table of contents. --Timeshifter (talk) 17:25, 23 December 2025 (UTC)Reply

Example of table with leader lines

[edit]

Recently while working on wikisource to convert an old table, I managed to use leader lines in a table that worked fairly satisfactory. I was wondering if this example would merit inclusion in the guide here, since I would like to share how I did this with other users.

{| style="margin: auto; border: none;"
|-
| || H<sub>2</sub> || N<sub>2</sub> || O<sub>2</sub> || CO || CO<sub>2</sub> || N<sub>2</sub>O || C<sub>2</sub>H<sub>4</sub>
|-
| {{ll||<math display=inline> 10^b \eta_0 </math> }}|| 86 || 166 || 187 || 162 || 138 || 135 || 92
|-
| {{ll||<math display=inline> M </math>}} || 2 || 28 || 32 || 28 || 44 || 44 || 28 
|-
| {{ll||<math display=inline> C </math> }} || 79 || 109 || 127 || 100 || 277 || 260 || 272 
|- 
| {{ll||<math display=inline> (2a)^2 \text{(relative)}  </math> }} || 127 || 228 || 206 || 239 || 239 || 261 || 288
|-
| {{ll||<math display=inline> (2a)^3 \text{(relative)} </math> }}|| 1440 || 3440 || 2963 || 3698 || 3686 || 4230 || 4884 
|}

IanVG (talk) 22:18, 18 January 2026 (UTC)Reply

There are no column headers in this table. sapphaline (talk) 12:18, 19 January 2026 (UTC)Reply
I can't test this because Template:ll does not exist. --Redrose64 🌹 (talk) 22:44, 19 January 2026 (UTC)Reply
Woah, that’s weird, I should have tested this on Wikipedia before testing! The template works on Wikisource and looks like this: [my wikisource userpage](https://en.wikisource.org/wiki/User:IanVG/Tables). It’s near the bottom of the page! IanVG (talk) 06:19, 20 January 2026 (UTC)Reply
Or, s:User:IanVG/Tables#Finished table. Will examine later: need to go out for the day. --Redrose64 🌹 (talk) 09:33, 20 January 2026 (UTC)Reply

Unwanted bold and shading

[edit]

How do I eliminate the bolding of text and shading of the cell with 1959 in it?

Chart performance for "The Little Drummer Boy" by The Harry Simeone Chorale (1958—2025)
Holiday
season
Chart Peak
position
1958 US Billboard Hot 100[1] 13
1959 UK Singles (Official Charts)[2] 13
US Billboard Hot 100[1] 15
{| class="wikitable plainrowheaders" style="text-align:center"
|+ Chart performance for "The Little Drummer Boy" by The Harry Simeone Chorale (1958—2025)
! scope="col"| Holiday<br/>season
! scope="col"| Chart
! scope="col"| Peak<br />position
|-
| style="text-align:center;"|1958
|align="left"|US [[Billboard Hot 100|''Billboard'' Hot 100]]<ref name = WhitburnHSC/>
| style="text-align:center;"|13
|-
! rowspan=2|1959
| style="text-align:left"{{singlechart|UKsinglesbyname|13|artist=Harry Simeone Chorale |artistid=6867}}
|-
|align="left"|US ''Billboard'' Hot 100<ref name = WhitburnHSC/>
| style="text-align:center;"|15
|}

Danaphile (talk) 12:02, 19 January 2026 (UTC)Reply

Use this code:
{| class="wikitable plainrowheaders" style="text-align:center"
|+ Chart performance for "The Little Drummer Boy" by The Harry Simeone Chorale (1958—2025)
! scope="col"| Holiday<br/>season
! scope="col"| Chart
! scope="col"| Peak<br />position
|-
| style="text-align:center;"|1958
|align="left"|US [[Billboard Hot 100|''Billboard'' Hot 100]]<ref name = WhitburnHSC/>
| style="text-align:center;"|13
|-
| rowspan=2|1959
| style="text-align:left"{{singlechart|UKsinglesbyname|13|artist=Harry Simeone Chorale |artistid=6867}}
|-
|align="left"|US ''Billboard'' Hot 100<ref name = WhitburnHSC/>
| style="text-align:center;"|15
|}
sapphaline (talk) 12:14, 19 January 2026 (UTC)Reply
Thanks so much! I'm looking at the highlighted line, but I'm not seeing the difference other than the color coding. Since I have much more to do on this project, I'd be interested in learning what I was doing wrong. Thanks again. Danaphile (talk) 13:24, 19 January 2026 (UTC)Reply
Your code was:
! rowspan=2|1959
My code is:
| rowspan=2|1959
sapphaline (talk) 13:50, 19 January 2026 (UTC)Reply
@Danaphile: The "plainrowheaders" class only works on row headers that have a scope of "row" or "rowgroup", i.e. ! scope="row" rowspan=2|1959. In this case, it doesn't seem like they need to be scoped or be headers; hence changing "!" to "|" for a normal data cell. The unused "plainrowheaders" class can be removed too. Jroberson108 (talk) 20:45, 19 January 2026 (UTC)Reply
Also, that class only removes the bold styling, not the background color since visually you still need a way to identify the row headers. Jroberson108 (talk) 20:58, 19 January 2026 (UTC)Reply

References

  1. ^ a b Cite error: The named reference WhitburnHSC was invoked but never defined (see the help page).
  2. ^ "Harry Simeone Chorale Songs and Albums | Full Official Chart History". Official Charts Company.

Row split in two

[edit]

This song reached number 6 on the Easy Listening chart two years in a row, so I put in rowspan=2 for both of those cells. It's only giving me one row that is split in two.

Chart performance for "The Little Drummer Boy" by The Harry Simeone Chorale (1958—2025)
Holiday
season
Chart Peak
position
1958 US Billboard Hot 100[1] 13
1959 UK Singles (Official Charts)[2] 13
US Billboard Hot 100[1] 15
1960 24
1961 22
US Billboard Easy Listening[1] 6
1962
US Billboard Hot 100[1] 28
{| class="wikitable" style="text-align:center"
|+ Chart performance for "The Little Drummer Boy" by The Harry Simeone Chorale (1958—2025)
! scope="col"| Holiday<br/>season
! scope="col"| Chart
! scope="col"| Peak<br />position
|-
| style="text-align:center;"|1958
|align="left"|US [[Billboard Hot 100|''Billboard'' Hot 100]]<ref name = WhitburnHSC/>
| style="text-align:center;"|13
|-
| rowspan=2|1959
| style="text-align:left"{{singlechart|UKsinglesbyname|13|artist=Harry Simeone Chorale |artistid=6867}}
|-
| rowspan=3 align="left"|US ''Billboard'' Hot 100<ref name = WhitburnHSC/>
| style="text-align:center;"|15
|-
| style="text-align:center;"|1960
| style="text-align:center;"|24
|-
| rowspan=2 style="text-align:center;"|1961
| style="text-align:center;"|22
|-
| rowspan=2 align="left"|US ''Billboard'' [[Adult Contemporary (chart)|Easy Listening]]<ref name = WhitburnHSC/>
| rowspan=2 style="text-align:center;"|6
|-
| rowspan=2 style="text-align:center;"|1962
|-
|align="left"|US ''Billboard'' Hot 100<ref name = WhitburnHSC/>
| style="text-align:center;"|28
|-
|}

Danaphile (talk) 21:01, 19 January 2026 (UTC)Reply

@Danaphile: Complicated, had to clean it up some first, then flatten it and start over with the spans. Seems to be some issues if the spanning is complex like this one. Removing the span on "6" seems to make it work, otherwise I can't span 1961. At least now 6 matches the above unspanned 13.
Chart performance for "The Little Drummer Boy" by The Harry Simeone Chorale (1958—2025)
Holiday
season
Chart Peak
position
1958 US Billboard Hot 100[1] 13
1959 UK Singles (Official Charts)[2] 13
US Billboard Hot 100[1] 15
1960 24
1961 22
US Billboard Easy Listening[1] 6
1962 6
US Billboard Hot 100[1] 28
Jroberson108 (talk) 22:05, 19 January 2026 (UTC)Reply
Thinking more about it, having rowspan of 2 on both "US Billboard Easy Listening" and "6" is the same as 1 row, so that might be the issue. Jroberson108 (talk) 22:13, 19 January 2026 (UTC)Reply
This is another manifestation of this "bug" report from almost a year ago; see in partcular my post of 20:33, 4 February 2025. --Redrose64 🌹 (talk) 22:52, 19 January 2026 (UTC)Reply
Using the original table, added more to 1961 and 1962. That rendering bug seems to be the issue.
Chart performance for "The Little Drummer Boy" by The Harry Simeone Chorale (1958—2025)
Holiday
season
Chart Peak
position
1958 US Billboard Hot 100[1] 13
1959 UK Singles (Official Charts)[2] 13
US Billboard Hot 100[1] 15
1960 24
1961
more
22
US Billboard Easy Listening[1] 6
1962
more
US Billboard Hot 100[1] 28
Jroberson108 (talk) 23:12, 19 January 2026 (UTC)Reply
It's not a rendering bug, but expected behaviour, as I described in February 2025. --Redrose64 🌹 (talk) 09:31, 20 January 2026 (UTC)Reply
Interesting, Firefox renders it correctly. Maybe some other engines do to? Layout algorithm differences? Jroberson108 (talk) 23:45, 20 January 2026 (UTC)Reply

References

  1. ^ a b c d e f g h i j k l Cite error: The named reference WhitburnHSC was invoked but never defined (see the help page).
  2. ^ a b c "Harry Simeone Chorale Songs and Albums | Full Official Chart History". Official Charts Company.

Exceeding double precision

[edit]
Note: Moved here from Help talk:Sortable tables (which now redirects here).

Since numerical data sort values are stored in double-precision floating-point format, I had the idea of writing a section about limitations of double precision. In particular, I found that passing a numeric string that parses as +∞ would allow numeric sorting at positive infinity. –LaundryPizza03 (d) 06:13, 20 January 2026 (UTC)Reply

Okay, I have an example now (based on Isotopes of bromine). I don't think we have a section on tables with mixed units yet, and the final draft might use a different subset of the table.

LaundryPizza03 (d) 06:50, 20 January 2026 (UTC) I propose putting this in #Default data type of a column and creating a new section on data with mixed units:Reply

The wiki software uses double-precision floating-point format, which offers approximately 15 significant digits of precision and can represent numbers ranging in absolute value from approximately 4.9×10−324 to 1.7×10308. While tables with extremely large or extremely small values may not sort correctly, the numerical sort value of +∞ (plus infinity) can be encoded by a number that exceeds the upper limit of double precision.

LaundryPizza03 (d) 07:12, 20 January 2026 (UTC)Reply

Calling in some help since I don't have the time now: Jroberson108, Redrose64, sapphaline. --Timeshifter (talk) 14:01, 20 January 2026 (UTC)Reply
Help with what? –LaundryPizza03 (d) 15:37, 20 January 2026 (UTC)Reply

LaundryPizza03. I moved this discussion here so that it is more likely to get noticed. --Timeshifter (talk) 11:20, 22 January 2026 (UTC)Reply

How can I link up the archive subpages for the original talk page that got redirected? –LaundryPizza03 (d) 11:31, 22 January 2026 (UTC)Reply
They will eventually be copied to the main talk page archives. This has been done with other talk page archives for table talk pages that are not well watched. That will allow them to be found by the main talk page search engine.
For now they are here:
Help talk:Sortable tables/Archive 5
--Timeshifter (talk) 11:47, 22 January 2026 (UTC)Reply

LaundryPizza03. I (and apparently others) are just not finding the time to help here. It might also have to do with that fact that it is advanced-math related. :) Feel free to add info to Help:Sortable tables. Hopefully someone will correct any errors.

For those who are interested, I moved the sortable table talk archives (Help talk:Sortable tables/Archive 5, etc.) to Help talk:Table archives. Archives 11 through 14 here are strictly sortable table archives. Archive 15 begins with the last of those talk threads, and then finishes with the latest Help talk:Table threads that have been archived. --Timeshifter (talk) 21:12, 2 February 2026 (UTC)Reply

I just added this to the page. I have also added a subsection about sorting dimensional quantities. –LaundryPizza03 (d) 22:10, 2 February 2026 (UTC)Reply

Dark Mode issue: Tables with "style=background: none" are difficult to read.

[edit]

When viewing tables with the background set to transparent/none, the text is made a dark grey (#202122) on a black background, making it difficult to read. This can be seen on the Help page under the "Non-rectangular tables" section in "Workarounds":

Help:Table#Non-rectangular tables

Notably, this behavior is different depending on if the background is set to "transparent" or "none": transparent has links be in their usual blue/purple colors, while none has links also be set to that gray color.

I'm sorry if this isn't the right place to report this; There were many places that seemed like they could be viable candidates. Dinjoralo (talk) 14:11, 20 March 2026 (UTC)Reply

@Dinjoralo: See: Help:Advanced table features#Avoid background:none or transparent.
There are multiple sections on color starting here:
Help:Advanced table features#Colors in tables.
--Timeshifter (talk) 17:34, 20 March 2026

@Dinjoralo: I see the problem in dark mode. I removed that section from the help page until someone can fix it. I don't have the time right now. Here it is:

Cell borders can be hidden by adding border: none; background: none; to the style attributes of either the table or the cell,[note 1] though this may not work in older browsers. Another use case for this is for implementing aligned multi-column tables:

Wikitext

{| class=wikitable style="border: none; background: none;"
! colspan=2 rowspan=2 style="border: none; background: none;" | [[File:Pfeil_SO.svg |none|link=|20px]]
! colspan=3 | To
|-
! Solid !! Liquid !! Gas
|-
! rowspan=3 | From
! Solid
| Solid–solid transformation || Melting || Sublimation
|-
! Liquid
| Freezing || {{sdash}} || Boiling/evaporation
|-
! Gas
| Deposition || Condensation || {{sdash}}
|}

Produces

To
Solid Liquid Gas
From Solid Solid–solid transformation Melting Sublimation
Liquid Freezing Boiling/evaporation
Gas Deposition Condensation

The removal of the link on an image is dependent on it being purely decorative (as it will be ignored by assistive devices).

Wikitext

{| class=wikitable style="border: none; background: none;"
! scope=col | Year
! scope=col | Size
| rowspan=5 style="border: none; background: none;"|
! scope=col | Year
! scope=col | Size
| rowspan=5 style="border: none; background: none;"|
! scope=col | Year
! scope=col | Size
|-
| 1990 || 1000<br>(est) || 2000 || 1357 || 2010 || 1776
|-
| 1991 || 1010 || 2001 || 1471 || 2011 || 1888
|-
| colspan=2 style="text-align: center;"|| colspan=2 style="text-align: center;"|| colspan=2 style="text-align: center;"||-
| 1999 || 1234 || 2009 || 1616 || 2019 || 1997<br>(est)
|}

Produces

Year Size Year Size Year Size
1990 1000
(est)
2000 1357 2010 1776
1991 1010 2001 1471 2011 1888
1999 1234 2009 1616 2019 1997
(est)
  1. ^ Applying background: none to the entire table will, perhaps predictably, subtly alter its color palette.

--Timeshifter (talk) 16:28, 21 March 2026 (UTC)Reply

Understood. I saw a table like this in an article, and didn't know if the original had a specific reason for using those styles. I'll go ahead and edit that article to remove the background color from the table. Dinjoralo (talk) 16:55, 25 March 2026 (UTC)Reply

Potential glitch

[edit]

For a while now, I’ve had an issue where I can’t select a large range of cells that requires scrolling down without the page forcing me to scroll back up. For example, at Foreign relations of Palau, if I try to select all the countries under the “Country” column in the table, I would normally click on “Australia,” hold the button, and scroll down to “Trinidad and Tobago.” However, I’m no longer able to do this because the page keeps scrolling back up. Is anyone else experiencing this? Semsûrî (talk) 09:10, 30 March 2026 (UTC)Reply

I've never done that. But if I want to copy a column I go into the visual editor. Then I click on the top cell of what I want to copy. Then shift-click on the bottom cell of what I want to copy. Then ctrl-c to copy the selected cells. --Timeshifter (talk) 14:10, 30 March 2026 (UTC)Reply
I did not know of that trick. Thank you. Semsûrî (talk) 15:19, 30 March 2026 (UTC)Reply
@Semsûrî: You're welcome. See also: Help:Creating tables#Insert blank row/column and the following sections on moving, deleting, and copying columns. And: Help:Table#Column operations. --Timeshifter (talk) 15:32, 30 March 2026 (UTC)Reply

Help. Collapsible tables

[edit]

Hi folks. Not expecting much because I get that people are busy. I am confused with the template: is it possible to format a table so that rows after a certain point are hidden until you click [show], basically a wikitable mw-collapsible innercollapse class inside of the table, so that the section below is hidden? My attempts all broke the table. Table WIP is at User:Catcus_DeMeowwy/Chinese_herbology#Usage_of_some_Chinese_herbs for reference.

Other talk topics asking the same have no replies/solution. I have left other attemps (template:hidden_begin) in tact to show my working. Catcus DeMeowwy (talk) 11:49, 1 May 2026 (UTC)Reply

Bumping topic at 21:24, 3 May 2026 (UTC) ~ ~Catcus DeMeowwy (talk)
~ ~Catcus DeMeowwy (talk) 21:24, 3 May 2026 (UTC)Reply
@Catcus DeMeowwy: See Help:Collapsing tables and more#Collapsible tables. The class is added to the table, not a row. Trying to add markup around specific rows is going to break the table markup. Jroberson108 (talk) 05:00, 4 May 2026 (UTC)Reply

Need numbers with ~ in front to sort correctly

[edit]

Need option for ~ which is often used in front of numbers in tables. For example in this table:

See Template talk:Circa/doc/sortable and:

Need a version of this template for when ~ is used in front of numbers in tables.

Or better yet the mediawiki software needs to ignore ~ if data-sort-type=number is used in the column head.

See Help:Sortable tables#Forcing a column to have a particular data type. --Timeshifter (talk) 18:56, 5 May 2026 (UTC)Reply

@Timeshifter: On that cell, set data-sort-value="" to the same numeric value excluding the tilde. Jroberson108 (talk) 05:42, 6 May 2026 (UTC)Reply
@Jroberson108: Thanks. I created this section:
Help:Sortable tables#~ for approximately --Timeshifter (talk) 21:49, 6 May 2026 (UTC)Reply

Making two table the same layout?

[edit]

@Noleander In Special:Permalink/1353013986#Water sources and sinks, there's two tables that ideally should be rendered with the same width columns without resorting to ugly hacks like fixed pixel widths (which I'm not willing to sink to). The biggest variation is in the first column, with the longest cell being 9 Mouth of Atbarah River in the second table. Is there some way to say (in both tables) Make this column the correct width to contain "9 Mouth of Atbarah River"? That should get both of them layed out the same while still allowing the formatting to adapt to whatever local fonts and screen-size are in use. RoySmith (talk) 17:18, 7 May 2026 (UTC)Reply

Or, more generally, is there some way to say "Make these two tables have the same width columns, whatever that turns out to be at render time?" RoySmith (talk) 17:20, 7 May 2026 (UTC)Reply
I'm not enough of a table-smith to know how to accomplish that. I'm sure the table rendering software dynamically sets column widths based on a variety of factors. Forcing table columns to a specific width (even if it is only "match that other table") may run contrary to the spirit of "rely on the table rendering software to set the column widths." But maybe some table guru knows a way. Noleander (talk) 17:58, 7 May 2026 (UTC)Reply

I don't know why one would want the 2 tables to have the exact same column widths.

And why are you linking to an old version of the page? When I look at the latest version (Nile#Water sources and sinks) the 2 tables are fairly similar in column widths. Except for the first column on the left.

You could force the width in various ways. See

--Timeshifter (talk) 21:33, 7 May 2026 (UTC)Reply

I want them to have the same widths because the two table display the same type of information and I want to make it easy for a reader to visually follow a column from one to the other. RoySmith (talk) 21:41, 7 May 2026 (UTC)Reply
OK, though I don't think it is that hard to follow down. Dig around that help page I linked to. --Timeshifter (talk) 22:02, 7 May 2026 (UTC)Reply