Jump to content

Help talk:Table/Archive 7

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Lowercase sigmabot III (talk | contribs) at 02:26, 8 July 2020 (Archiving 1 discussion(s) from Help talk:Table) (bot). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Archive 1Archive 5Archive 6Archive 7Archive 8Archive 9Archive 10

Sortable table with white background and lines?

Hi

Is there a way of having a sortable table but in the same style of a simple table with no background colour or lines?

Thanks

John Cummings (talk) 09:15, 11 October 2015 (UTC)

Just omit the wikitable class. With class="wikitable sortable":
Sortable table
Alphabetic Numeric Date Unsortable
d 20 2008-11-24 This
b 8 2004-03-01 column
a 6 1979-07-23 cannot
c 4 1492-12-08 be
e 0 1601-08-13 sorted.
With only class="sortable":
Sortable table
Alphabetic Numeric Date Unsortable
d 20 2008-11-24 This
b 8 2004-03-01 column
a 6 1979-07-23 cannot
c 4 1492-12-08 be
e 0 1601-08-13 sorted.
PrimeHunter (talk) 09:27, 11 October 2015 (UTC)
Hi PrimeHunter, thanks so much, you've saved me a lot of time :) John Cummings (talk) 11:08, 11 October 2015 (UTC)

Multidimensional tables

Is there any way to create tables with more than two dimensions? E.g. select the third dimension from a dropdown or radio-button list, which updates the table showing the first two dimensions. Irfan (talk) 10:34, 13 October 2015 (UTC)

@Irfanadilovic: The English Wikipedia does not support that and I don't know of other wikis that do. A drop-down list should be possible to code with JavaScript but it will only work for users with JavaScript in their browsers. MediaWiki:Gadget-charinsert-core.js makes the drop-down list below the edit box where you can select Insert, Wiki markup, Symbols, Latin and so on. I'm not a JavaScript coder. PrimeHunter (talk) 12:40, 13 October 2015 (UTC)

PLEASE HELP. DO YOU KNOW HOW TO PUT TWO TABLES PARALLEL TO EACH OTHER?? one beside the other???

PLEASE HELP. DO YOU KNOW HOW TO PUT TWO TABLES PARAREL TO EACH OTHER?? one beside the other??? EXAMPLES


I do not want one below the other. please help i need this for my work on the proyect im writing here in wikipedia. blessings --Cheposo (talk) 03:21, 14 November 2015 (UTC)

Please do not SHOUT! ;)
Wrap the 2 tables inside another table:
Note: style="vertical-align:top;"
It aligns the top of both tables.
--Timeshifter (talk) 18:26, 14 November 2015 (UTC)

MY FRIEND THANKS THANKS THANKS THANKS THANKS A LOT!!!!!!!!!!!! Cheposo (talk) 21:43, 14 November 2015 (UTC)

Note: Section below started on user talk page, and moved here to help others too.

first i want to thank you for helping me with the tables , but i have another problem my friend, i geb you:

i want this two tables as they are, one near de other, but located in the center of the page. PLEASE PLEASE MY FRIEND!!! this king of info should be in the table tutorials on wiki. PLease show me the code!!!!Cheposo (talk) 13:30, 15 November 2015 (UTC)

You're welcome. This centers the tables: style="margin:auto;"
--Timeshifter (talk) 18:33, 15 November 2015 (UTC)

THANKLS MY FRIEND!!!! REALLY REALLY REALYY THANKS!!!!!!! THANK YOU!!!! Cheposo (talk) 17:35, 14 December 2015 (UTC)


HEY TIME SHIFTER MY FRIEND!!!!! THANKS FOR THE HELP. I HAVE ANOTHER REQUEST OF HELP. I WANT TO MAKE THIS TABLE, BUT I DONT KNOW HOW TO MAKE THE CODE, SO I WENT TO PAINT AND I PAINTED THE TABLE I NEED FOR KEEP WORKING: LOOK AT IT


please my friend i depend on you to keep working Cheposo (talk) 17:45, 14 December 2015 (UTC)

OK. Is this what you want?:
Gundam Wing
Origen Origen Origen Origen






Transmision

Or collapsed to begin with:

--Timeshifter (talk) 23:36, 14 December 2015 (UTC)


TIME SHIFTER!!!! YOU ARE THE GOD OF TABLESSS!!!!! THANKS A LOT!!!!!!!!!!!!!  :) Cheposo (talk) 00:26, 15 December 2015 (UTC)

Any chance to collapse columns or rows?

It would be so helpful to be able, when you create a table, to define a button that can collapse for example columns 2,4,6 or some rows that you need to collapse. Is there any way to do this? If not, did anyone think about implementing such a thing? Thanks. —  Ark25  (talk) 00:28, 22 December 2015 (UTC)

uneven rowspans

is there any easy way to make a table with the following layout?

+-----+-----+
|     |     |
| 1.1 |     |
|     | 1.2 |
+-----+     |
|     |     |
| 2.1 +-----+
|     |     |
+-----+     |
|     | 2.2 |
| 3.1 |     |
|     |     |
+-----+-----+

my attempts to do this with rowspans summing to 6 have failed for some reason. thank you. Frietjes (talk) 17:14, 11 May 2015 (UTC)

follow up, very odd but this
{| class="wikitable"
| rowspan=2 | 1.1
| style="display:none"|
| rowspan=3 | 1.2
|-
| style="display:none"|
|-
| rowspan=2 | 2.1
| style="display:none"|
|-
| style="display:none"|
| rowspan=3 | 2.2
|-
| rowspan=2 | 3.1
| style="display:none"|
|-
| style="display:none"|
|}
works, but if I remove the fake cells, it doesn't work. Frietjes (talk) 17:20, 11 May 2015 (UTC)
Have a look at how I did it at {{rail line three to two}}. Basically, you need to have six rows. --Redrose64 (talk) 18:35, 11 May 2015 (UTC)
I have a similar problem with a table. This is how it looks now:
Team A Team B
Cliff Morgan (1970–75) Henry Cooper (1970–79)
Fred Trueman (1976–77)
Brendan Foster (1977–79)
Gareth Edwards (1979–81) Emlyn Hughes (1979–81)
Bill Beaumont (1982–96) Willie Carson (1982–83)
Emlyn Hughes (1984–88)
Ian Botham (1988–96)
John Parrott (1996–2002) Ally McCoist (1996–2007)
Frankie Dettori (2002–04)
Matt Dawson (2004–present)
Phil Tufnell (2008–present)
It should look like this:
+--------------------------+---------------------------+
|       '''Team A'''       |        '''Team B'''       |
+--------------------------+---------------------------+
|Cliff Morgan (1970–75)    |                           |
+--------------------------+                           |
|Fred Trueman (1976–77)    |Henry Cooper (1970–79)     |
+--------------------------+                           |
|Brendan Foster (1977–79)  |                           |
+--------------------------+---------------------------+
|Gareth Edwards (1979–81)  |Emlyn Hughes (1979–81)     |
+--------------------------+---------------------------+
|                          |Willie Carson (1982–83)    |
|                          +---------------------------+
|Bill Beaumont (1982–96)   |Emlyn Hughes (1984–88)     |
|                          +---------------------------+
|                          |                           |
+--------------------------+Ian Botham (1988–96)       |
|                          |                           |
|John Parrott (1996–2002)  +---------------------------+
|                          |                           |
+--------------------------+                           |
|Frankie Dettori (2002–04) |Ally McCoist (1996–2007)   |
+--------------------------+                           |
|                          |                           |
|Matt Dawson (2004–present)+---------------------------+
|                          |Phil Tufnell (2008–present)|
+--------------------------+---------------------------+
My efforts to achieve this were all in vain, even with the fake cells. Tvx1 21:04, 28 May 2015 (UTC)
Please give a link to where you carried out your testing. --Redrose64 (talk) 21:52, 28 May 2015 (UTC)
Ian Botham and John Parrott share a row in your code but that row renders with height 0 for me. Same for the row shared by Ally McCoist and Matt Dawson. The below looks OK for me in a Firefox test but may change display in other circumstances. It uses height to force some multi-row cells to a certain height. PrimeHunter (talk) 22:31, 28 May 2015 (UTC)
Team A Team B
Cliff Morgan (1970–75) Henry Cooper (1970–79)
Fred Trueman (1976–77)
Brendan Foster (1977–79)
Gareth Edwards (1979–81) Emlyn Hughes (1979–81)
Bill Beaumont (1982–96) Willie Carson (1982–83)
Emlyn Hughes (1984–88)
Ian Botham (1988–96)
John Parrott (1996–2002)
Ally McCoist (1996–2007)
Frankie Dettori (2002–04)
Matt Dawson (2004–present)
Phil Tufnell (2008–present)
I use Firefox: and the above comes out uneven. Setting an explicit height makes assumptions, which you shouldn't do when laying out a table. The characteristics of your system are not the same as everybody else's.
{{rail line three to two}} works by having a column (two in fact) with no rowspans at all, each of the six cells in that column contain a   to force some height into each row. They appear to be a single 6-high cell because the top five cells have the bottom border removed, and the bottom five cells have the top border removed, so that the five common borders are absent. --Redrose64 (talk) 22:57, 28 May 2015 (UTC)
The table I pasted here is just one attempt I made to make it work (and it seems I didn't even correctly coded the Parrot-Botham row). This is how it was originally coded:
{| class="wikitable"
|-
! Team A 
! Team B
|-
| [[Cliff Morgan]] (1970–75) 
| rowspan=3|[[Henry Cooper]] (1970–79)
|-
| [[Fred Trueman]] (1976–77) 
|-
| [[Brendan Foster]] (1977–79) 
|-
| [[Gareth Edwards]] (1979–81) 
| [[Emlyn Hughes]] (1979–81)
|-
| rowspan=3|[[Bill Beaumont]] (1982–96) 
| [[Willie Carson]] (1982–83)
|-
| [[Emlyn Hughes]] (1984–88)
|-
| [[Ian Botham]] (1988–96)
|-
| [[John Parrott]] (1996–2002) 
| rowspan=3|[[Ally McCoist]] (1996–2007)
|-
| [[Frankie Dettori]] (2002–04) 
|-
| rowspan=2|[[Matt Dawson]] (2004–present) 
|-
| [[Phil Tufnell]] (2008–present)
|}
I tried to apply the "fake cells" to that, but it didn't work obviously. I didn't test in any sandbox or so. I just edited it and used the preview button to check whether it worked and cancelled the edit altogether when I noticed it didn't. That means I can't provide a link to anything, unfortunately. Any of course in this one too the Parrot-Botham row isn't correctly coded yet. Tvx1 23:40, 28 May 2015 (UTC)
The fake cell approach leads to something like this. Not particularily better I think, or at least not how I worked it.
Team A Team B
Cliff Morgan (1970–75)  
Fred Trueman (1976–77) Henry Cooper (1970–79)
Brendan Foster (1977–79)  
Gareth Edwards (1979–81) Emlyn Hughes (1979–81)
  Willie Carson (1982–83)
Bill Beaumont (1982–96) Emlyn Hughes (1984–88)
   
  Ian Botham (1988–96)
John Parrott (1996–2002)  
   
Frankie Dettori (2002–04) Ally McCoist (1996–2007)
   
   
Matt Dawson (2004–present) Phil Tufnell (2008–present)
   


--Jules (Mrjulesd) 00:07, 29 May 2015 (UTC)

Well at least that table is correct. The only issue that one has is that some cells are larger than needed. Tvx1 22:05, 29 May 2015 (UTC)
Using style heights, but tweaking slightly gives this:
Team A Team B
Cliff Morgan (1970–75) Henry Cooper (1970–79)
Fred Trueman (1976–77)
Brendan Foster (1977–79)
Gareth Edwards (1979–81) Emlyn Hughes (1979–81)
Bill Beaumont (1982–96) Willie Carson (1982–83)
Emlyn Hughes (1984–88)
Ian Botham (1988–96)
John Parrott (1996–2002)
Ally McCoist (1996–2007)
Frankie Dettori (2002–04)
Matt Dawson (2004–present)
Phil Tufnell (2008–present)
Perhaps a slight improvement. --Jules (Mrjulesd) 11:28, 31 May 2015 (UTC)
Indeed, but now the Dawson-McCoist shared row is hardly noticable. Tvx1 13:52, 31 May 2015 (UTC)
@Tvx1: how about this?
Team A Team B
Cliff Morgan (1970–75) Henry Cooper (1970–79)
Fred Trueman (1976–77)
Brendan Foster (1977–79)
Gareth Edwards (1979–81) Emlyn Hughes (1979–81)
Bill Beaumont (1982–96) Willie Carson (1982–83)
Emlyn Hughes (1984–88)
Ian Botham (1988–96)
John Parrott (1996–2002)
Ally McCoist (1996–2007)
Frankie Dettori (2002–04)
Matt Dawson (2004–present)
Phil Tufnell (2008–present)
Not improved probably. I would try to tweak the height until is seems correct, but it's a little difficult to get exactly right, it doesn't seem to work how I predict for some reason. May also vary between browsers. --Jules (Mrjulesd) 16:16, 31 May 2015 (UTC)
No. now the McCoist, Dawson and Tufnell cells are way to large and Parrot and McCoist no longer share a row. I highly appreciate your efforts but I'm not sure this is the right way to solve this. I still wonder why the original table doesn't appear the way it's coded? It has a rowspan of 2 for Matt Dawson, but only one row appears. Similarly it has a rowspan of 3 for Ally McCoist, but only two appear. Tvx1 16:36, 31 May 2015 (UTC)
Parrot and McCoist do share a cell, at least on my system, but you're right it probably isn't an improvement.
I think the reason rowspan doesn't work correctly is that whoever programmed it didn't envisage this overlapping of cells, and did it purely as perfectly lined up cells, but cells lining up with more than one cell. They should have really, there was no reason for this not to work as originally envisaged, but I don't think they basically thought of this situation, and didn't implement it properly. Or at least that's a probably explanation.
Having said, I would just pick whichever one you like best and go with it. Or maybe the help desk / village pump would have more luck. --Jules (Mrjulesd) 16:56, 31 May 2015 (UTC)
Having fiddled with it some more myself I finally achieved the intended result. A wholehearted thanks. Tvx1 17:58, 23 December 2015 (UTC)
Team A Team B
Cliff Morgan (1970–75) Henry Cooper (1970–79)
Fred Trueman (1976–77)
Brendan Foster (1977–79)
Gareth Edwards (1979–81) Emlyn Hughes (1979–81)
Bill Beaumont (1982–96) Willie Carson (1982–83)
Emlyn Hughes (1984–88)
Ian Botham (1988–96)
John Parrott (1996–2002)
Ally McCoist (1996–2007)
Frankie Dettori (2002–04)
Matt Dawson (2004–present)
Phil Tufnell (2008–present)

Maximum number of rows

Is there a limit to the number of rows in a table. It would be a sortable table with 3 columns and potentially about 2,000 rows. Is that possible? Piriczki (talk) 18:40, 15 January 2016 (UTC)

There is no intrinsic limit and what you want to do is likely possible. See List of canals in Oregon (660+ rows) and User:EncMstr/List of Oregon GNIS features (2186 rows) for extreme examples. Some computers/browsers may not work correctly with a large number of rows, but that is due to individual system limitations, not a limit of a table. —EncMstr (talk) 00:59, 16 January 2016 (UTC)
There is a limit in a page (table or not table). It's called template_include_size_limit. That's the reason why User:EncMstr/List of Oregon GNIS features (2186 rows) is on trouble: so many calls to template {{coord}} are above the TISL. Obviously, this would not apply to a text-only table. Pldx1 (talk) 10:21, 23 February 2016 (UTC)

Sticky table header

Please provide a sticky header while scrolling long tables (longer than a screen height), like in this example. It will be very useful. 79.191.252.28 (talk) 13:16, 3 March 2016 (UTC)

Table Overflows Into Right Margin

In the Safari browser on an iPad in the Cladograms section a table overflows to the right edge of the right margin and pushes the right edge of the margin to the right, expanding the right margin to nearly half the page. The entire text of the article is squeezed into the left half of the page.

I see this effect in other articles, e.g., a table in the Vocabulary comparison section of the Romance Languages article, but don't know how to fix it. — Preceding unsigned comment added by 173.72.170.69 (talkcontribs) 15:50, 4 December 2011‎

Clean up table of contents // Restructure

This help page has too many unordered information in it. I'd suggest a massive clean-up. If you don't want to delete whole sections, just improve nesting of headlines. Check these headlines - very hard to understand IMHO (sections 9-16):

9 Other table syntax
     9.1 Comparison of table syntax
 10 Pipe syntax in terms of the HTML produced
     10.1 Tables
     10.2 Rows
     10.3 Cells
     10.4 Headers
     10.5 Captions
     10.6 Summaries
 11 Square monitors
 12 Vertically oriented column headers
 13 Wikitable as image gallery
     13.1 Shifting/centering
 14 Generate a chart with a table
 15 Converting spreadsheet to wikitable format
 16 Tables and WYSIWYG -- — Preceding unsigned comment added by Jesus Presley  (talkcontribs) 19:31, 25 November 2012

Bottom/Footer

Hi there. I believed that, once upon a time, I saw a wikitable with a bottom/footer section. This would be a row spanning all columns, and a place for notes etc.. I am currently editing List of British Columbia Provincial Parks and have such a footer. Problem is it is a sortable wikitable, so whenever you do toggle a sorting, that footer gets caught up in the sort instead of staying at the bottom. Is there a solution to this? If so, I would also kindly ask for it to be added to the help page. Thanks! --Natural RX 15:53, 4 March 2016 (UTC)

@Natural RX: There's a "sortbottom" feature for this. It's described at Help:Sorting#Excluding rows from sorting. -- John of Reading (talk) 16:50, 4 March 2016 (UTC)
Excellent, thanks! --Natural RX 17:19, 4 March 2016 (UTC)

PLEASE SOME ONE HELP ME

PLEASE HELP ME TO MAKLE THIS TABLE I HAVE A LOT WORKIGN AND IMPROVING THIS ARTICLE AND I NEED SOME THING LIKE THIS BUT WITH THE CHANGES I WANT CAN SOME ONE MAKE THIS TABLE FOR ME PLEASE?

table request


I WANT TO USE THIS ON THE SPANISH WIKIPEDIA. CAN SOME ONE PLEASE MAKE SOMETHING THAT LOOKS LIKE THIS????? I BEG FOR SOME ONE HWO CAN HELP ME PLEASE.

--Cheposo (talk) 03:55, 18 May 2016 (UTC)

perhaps try copying the format from something like Discography_of_the_Devil_May_Cry_series that has some hide/show tech in there, you can add colours and pictures afterward, not sure it's the best example but it's simple enough it will probably work on other wikipedias as it doesn't look to be using templates that might be called something else - but if you look around some famous artist's articles I'm sure you'll find some example that better matches what you're looking for , I had asuper quick look at Elvis and The_Beatles_discography both look fairly similar (without the hide/show) EdwardLane (talk) 07:41, 18 May 2016 (UTC)

Strange table width behaviour

I'd appreciate an expert explaining to me why this edit made the table wider. I've built several of these tables -- see earlier in the same article, for example -- and the goal is to have minimal white space around the table entries, to avoid an unnecessarily wide table. The other examples in the article show what I'm trying to achieve. I tried removing the style=width entries and that didn't help. Evidently something is different about this table, but I can't figure out what it is. Thanks for any help. Mike Christie (talk - contribs - library) 20:08, 10 July 2016 (UTC)

I've kludged it by putting in a table width in pixels, but surely that's not the best answer. Mike Christie (talk - contribs - library) 20:14, 10 July 2016 (UTC)
Spring Summer Fall Winter
1988 50/1 50/2 50/3 50/4
2002 58/3 58/4 59/1 59/2
Issues of Weird Tales from 1988 to 2002, showing volume and issue numbers.
Note that the four issues starting with Summer 1994 were titled Worlds of Fantasy & Horror.
Spring Summer Fall Winter
1988 50/1 50/2 50/3 50/4
2002 58/3 58/4 59/1 59/2
Issues of Weird Tales from 1988 to 2002, showing volume and issue numbers.
Note that the four issues starting with Summer 1994 were titled Worlds of Fantasy & Horror.
@Mike Christie: The table is widened to display the single-cell bottom row without line wrapping. You could have placed a linebreak <br /> before the second sentence. The current version has so much content in the bottom row that limiting the whole table width may be a better solution. PrimeHunter (talk) 14:35, 11 July 2016 (UTC)
@PrimeHunter: I don't think that's the whole answer. You're right that putting in <br /> helps; I've done it before to good effect, e.g. here. However, there is some extra whitespace showing up at the right that I don't understand. See User:Mike Christie/Sandbox7; it has a <br /> in the caption but where is that extra space coming from? However, the table in the article itself is OK now, with the pixel limitation, so I'm asking now just to try to understand it. Mike Christie (talk - contribs - library) 14:53, 11 July 2016 (UTC)
@Mike Christie: I only see the width required to fit the longest line in the bottom row. I have Firefox 47.0.1. PrimeHunter (talk) 23:50, 11 July 2016 (UTC)
@PrimeHunter: I get this (the upper one is IE, the lower one is Chrome) when I display the table in the sandbox. If it looks OK in Firefox then perhaps it's a bug in the browser rendering? Mike Christie (talk - contribs - library) 00:11, 12 July 2016 (UTC)
@Mike Christie: I see the same as you in IE. I added two versions of the table here with widths removed in the second. In IE the first table is much wider and the second table is only as wide as required to avoid line wrapping in "Note ... Horror". In Firefox they both have that width. I don't know the reason for the IE rendering or whether it should be called a bug. Browsers have some freedom in rendering. PrimeHunter (talk) 13:09, 12 July 2016 (UTC)

Help at Channel Orange

I'm having no success with this table here, using "rowspan" so that the last line of items ("July 23, 2012"; "Universal Music Group"; "CD") also reaches the last row in the table ("France"). Can someone please help? Dan56 (talk) 22:10, 24 July 2016 (UTC)

@Dan56: "sortable" has problems with rowspans. Removing it would fix the issue. PrimeHunter (talk) 22:31, 24 July 2016 (UTC)

Problems with header cells

I'm having a slight problem while trying to build a table for a home video release of a TV series. For some reason, I can't seem to make the header cells or whatever you call them line up.

Expand to see malformed tables
{| class="wikitable" style="text-align: center; width: 98%;"
|-
! colspan="2" rowspan="2"| Set
! colspan="2" | Contents
|-
! Episodes !! Shorts
! Blu-ray / DVD artwork
! Bonus features
! Audio commentary
! BD / DVD release date
|-
| rowspan="1" width="1%" style="background: #778899;" |
| 1
| 
| 
| 
| 
| 
| 
|-
|}

renders as:

Set Contents
Episodes Shorts Blu-ray / DVD artwork Bonus features Audio commentary BD / DVD release date
1

For some reason, all the header cells after the double height one will not format correctly. When I try to make them the correct height by adding rowspan="2", thus

{| class="wikitable" style="text-align: center; width: 98%;"
|-
! colspan="2" rowspan="2"| Set
! colspan="2" | Contents
|-
! Episodes !! Shorts
! rowspan="2"| Blu-ray / DVD artwork
! rowspan="2"| Bonus features
! rowspan="2"| Audio commentary
! rowspan="2"| BD / DVD release date
|-
| rowspan="1" width="1%" style="background: #778899;" |
| 1
| 
| 
| 
| 
| 
| 
|-
|}

I end up with this:

Set Contents
Episodes Shorts Blu-ray / DVD artwork Bonus features Audio commentary BD / DVD release date
1

Does anyone know how to fix this? Ideally, I'd like a few more of these "nested header cells" or whatever you call them, but is that impossible? Thanks, G S Palmer (talkcontribs) 17:32, 28 July 2016 (UTC)

A cell must be specified in the row of the top part of the cell so "Blu-ray / DVD artwork" comes right after "Contents" like below. It's certainly possible to make more of the same type. PrimeHunter (talk) 19:30, 28 July 2016 (UTC)
Set Contents Blu-ray / DVD artwork Bonus features Audio commentary BD / DVD release date
Episodes Shorts
1
Thanks. G S Palmer (talkcontribs) 23:12, 28 July 2016 (UTC)
@PrimeHunter: Could you possibly demonstrate, on the "Audio Commentary" column? Because I still can't figure it out. I tried a few things, but they didn't work. I'm not good with tables. G S Palmer (talkcontribs) 23:31, 28 July 2016 (UTC)
Rowspan and colspan can be tricky. Only specify the cells that have their top in a given row, so there are no cells specified between "Shorts" and "Audio 1" below. PrimeHunter (talk) 23:41, 28 July 2016 (UTC)
Set Contents Blu-ray / DVD artwork Bonus features Audio commentary BD / DVD release date
Episodes Shorts Audio 1 Audio 2
1
Thank you very much. G S Palmer (talkcontribs) 01:22, 29 July 2016 (UTC)

Table split into columns

Hi, how do you split a table into two or more columns to avoid a long list and lots of white space? I'd like to do this to Regional League at this location [1] i.e. first column would be the 1944-45 to 1968-69 champions. Thanks. Eldumpo (talk) 06:58, 12 August 2016 (UTC)

One method is to make an outer table with one row and two cells, each containing a table. I did that in [2]. The tables are only sortable one at a time. I don't think it's possible to make the whole thing sortable with rows moving between the two columns when they are sorted. PrimeHunter (talk) 11:42, 12 August 2016 (UTC)
@PrimeHunter: Thanks very much. Eldumpo (talk) 08:13, 13 August 2016 (UTC)

Column width

Two questions:

  1. Why does the guide show how to specify column widths in pixels and then say that it's deprecated? I get why it's deprecated, but why give examples in a way that you don't want editors to use? It says to use ems instead but doesn't show how to do that.
  2. I've been trying in an article to line up the columns of consecutive tables using ems, but for some reason they're not consistent. Why is that? McLerristarr | Mclay1 07:12, 16 August 2016 (UTC)

Omitting the pipe between cell parameters and cell data

 Resolved: When editing Comparison of single-board computers I noticed quite a few existing instances where there is no pipe (|) or vertical bar between the cell parameters such as rowspan and/or data-sort-value and the cell data. The table seems to display and perform correctly. It appears the parsing rules allow cell data to get populated by a template. Is this behavior something we can expect will always work or should that article get fixed up to always separate the cell parameters and cell data with a pipe or bar?

Below is an example table. None of the cells use a pipe or bar between the parameters and data including a rowspan for column 3. Nearly all of the cells have their data inserted via templates. The exception is the middle cell on the second row where the parser must have decided the entire thing was data.

Col 1 Col 2 Col 3
Cell 1-1 Cell 1-2 Cell 1/2-3
Cell 2-1 data-sort-value=10 Cell 2-2

--Marc Kupper|talk 08:15, 19 August 2016 (UTC)

@Marc Kupper: The pipe is always necessary but it may be added by a template. {{Yes}} and {{no}} in your example add background coloring and alignment so they already have cell attributes followed by a pipe followed by cell data. If the caller has cell attributes before these templates then there must not be a pipe. Their documentation says so in the lead. Your cell with data-sort-value=10 Cell 2-2 has no pipe and no template which adds a pipe so none of the text is cell attributes. PrimeHunter (talk) 10:51, 19 August 2016 (UTC)
Thank you! It had not occurred to me to read the manual for something that seemed as straightforward as a Yes/No. --Marc Kupper|talk 20:56, 19 August 2016 (UTC)

Tennis tables query

Most tennis stat tables follow the formatting I have in the top table here. The difference is that if we have a number column at all, the number column is after the result column. If I move the number column before the result column I don't want it to be colored at all. If I use white as background it's brighter than the rest of the default table color (I used F9F9F9 instead). Is there a simple way to suppress the No. column color that I'm missing? Thanks. Fyunck(click) (talk) 18:39, 26 August 2016 (UTC)

HTML does not have whole-column operations. Wikitext table code is just an alternative to HTML syntax and doesn't add such features. And I don't think it's possible in an individual cell to say "Ignore the row color and use whatever color would have been here otherwise. Note the color is different in the mobile version so the first column in your second table gets varying color, at least in my desktop browser: https://en.m.wikipedia.org/w/index.php?title=User:Fyunck(click)/sandbox/charts. I think the proper method would be to use no row color and instead add cell color for every cell where you actually want the color. That's a lot of color code. It could be added by a Help:Table#Row template so articles could just say something like {{Tennis final row|7|Loss|15 January 2015|P|[[Sydney International]], Australia|Hard|CZE|[[Petra Kvitová]]||6–7<sup>(5–7)</sup>, 6–7<sup>(6–8)</sup>}}. Then {{Tennis final row}} could add styling, flagicon and so on, and simultaneously change the styling in all articles using it. The "P" (for Premier) is the tournament category which should determine the background color. If wanted, "Loss" could also be shortened to "L", "Hard" to "H" and so on. PrimeHunter (talk) 20:54, 26 August 2016 (UTC)
I was afraid of that. No way would the project agree to have to add color to every cell, so I guess we're stuck with color in the number column. As far as shortening loss to "L" you have to realize that right this second it is actually Winner and Runner-up, and my shortening it to Win and Loss is already unlikely to fly. So W and L would likely be obliterated. Thanks, I just thought it looked better as an uncolored column. What the heck is the default color for tables at wikipedia anyway? It looks like F9F9F9 in my Firefox browser, but there must be a way to find out. Fyunck(click) (talk) 00:01, 27 August 2016 (UTC)
I mean the call of a row template could say "L" to shorten the code (or make it optional to say L, Loss or Runner-up). The template could then write Loss, Runner-up or whatever is wanted, and it could be changed later without changing all the articles. PrimeHunter (talk) 12:44, 27 August 2016 (UTC)
Also, I guess mobile versions color schemes are different. IE, Firefox, and Chrome desktop browsers all look perfect with F9F9F9 as the cell color. No variance that I can detect. But the mobile version you used does all wiki-background as "white", so I'd have to change it to "white" to match perfectly. Fyunck(click) (talk) 23:25, 30 August 2016 (UTC)

Japanese_pottery_and_porcelain#Wares table

I need help with the table please. The Kanji column needs more spacing so that all the Chinese characters fit into one line. What edit would be necessary? Thank you. Gryffindor (talk) 21:32, 2 September 2016 (UTC)

I used {{nowrap}} on the longest text in the column [3] to make it wide enough but not wider than necessary. PrimeHunter (talk) 22:30, 2 September 2016 (UTC)
 Resolved Perfect, thank you very much. Gryffindor (talk) 23:08, 2 September 2016 (UTC)

An entire cell as a link?

Is it possible for an entire cell in a table to be a link itself, so rather than using [[A]] inside the cell, is there code that lets the whole cell from top to bottom, left to right be one big link? -- AxG /  / 10 years of editing 12:36, 24 September 2016 (UTC)

AFAIK, only in the usual way, by placing the cell's text to the right of a pipe after the intended link target:
no links here This will link to EN Wikipedia's Main Page – Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
-- Michael Bednarek (talk) 12:45, 24 September 2016 (UTC)

Help on table creation

Hello,

What's the right way to create a table for production figures?

I'd like to create a new monthly production table for the T-34 article. However, the tables on Soviet combat vehicle production during World War II gave me a rough idea, thought, I want it closer to the orginial as depicted in the book. Have a look on the picture: http://i.imgur.com/QCCHaRi.jpg

I've started with some tryouts on my sandbox, but, I'm not sure if I'm doing it right: https://en.wikipedia.org/wiki/User:Dircovic/sandbox

Would love to have some help! Thanks in advance. Dircovic (talk) 07:26, 12 November 2016 (UTC)

Diagonal split header

Hi, I have a quick question regarding the {{diagonal split header}} template: is there a similar template for the diagonal line going "the other way" (i.e. top-right to bottom-left)? Skewb? (talk) 23:53, 2 January 2017 (UTC)

@Skewb?: I don't think so but it could be made. What is it for? PrimeHunter (talk) 00:32, 3 January 2017 (UTC)
@PrimeHunter: It's not for anything important (though maybe it could be useful in the future). I just want to experiment with different shapes of tables on my sandbox, but I don't think there's any way of creating a diagonal split (either in the header or anywhere else) except for the above template. Skewb? (talk) 21:17, 3 January 2017 (UTC)
@Skewb?: A similar template to the above could certainly be made, or the type of code it uses could be written directly in a table. But the template uses an ugly hack to achieve it and diagonal "splits" in the other direction seem far less useful. The generated html is one cell with a diagonal line where the template just tries to guess how to position two different texts so they end up on each side of the line without an unnatural position in their triangle. Users of the template may have to add additional blankspace to avoid crossing the line. Other browsers, font settings, printers and so on may render it differently, and I imagine it's confusing to screen readers (see MOS:DTAB). Without a good use case I don't think it should be done. PrimeHunter (talk) 11:15, 4 January 2017 (UTC)
@PrimeHunter: Fair enough, I personally don't have an issue with writing the code itself directly into the table. I'm not very good at coding though, so could you please let me know what the code for diagonal lines (in both directions) would look like? Skewb? (talk) 12:55, 4 January 2017 (UTC)
@Skewb?: You can try Special:ExpandTemplates to see the code {{diagonal split header}} generates and then tinker with it. PrimeHunter (talk) 01:28, 5 January 2017 (UTC)

Indent a table

Hi there. How can an indent be introduced to move a simple table a bit to the right? Diceypoo (talk) 10:25, 25 February 2017 (UTC)

@Diceypoo: Place one or more colons before {|. PrimeHunter (talk) 10:38, 25 February 2017 (UTC)
@PrimeHunter: thanks. I had tried that, not sure why it didn't work! Any tips to make this easier to find / searchengine-friendlier? Diceypoo (talk) 13:05, 25 February 2017 (UTC) Indent Table Wiki Wikipedia
1 2
row1cell1 row1cell2
row2cell1 row2cell2

Rowspan in Aux1

Is it possible to use rowspan="number" in Aux column? The example of table used is the one for anime episodes --Yukinotane (talk) 23:02, 12 April 2017 (UTC)

@Yukinotane: Your question is about the Aux1 parameter of Template:Japanese episode list in for example One Room (anime)#Episode list. The table formatting is done by the template which has no support for adding a rowspan. PrimeHunter (talk) 23:48, 12 April 2017 (UTC)

Autonumbering

This could be added to the page. Thoughts? Anna Frodesiak (talk) 18:36, 20 April 2017 (UTC)

I agree that Module:Autonumber should be mentioned overleaf. This feature has also been mentioned at User:Pee Tern/Sandbox/Template/autonumbered list/doc. -- Michael Bednarek (talk) 06:08, 21 April 2017 (UTC)

Too wide table

What if the table is too wide? Ho to fix it? --Azot944 (talk) 19:17, 25 May 2017 (UTC)

@Azot944: It depends on the table, which changes you are willing to make, and what you consider too wide. Do you have a specific table in mind? PrimeHunter (talk) 20:24, 25 May 2017 (UTC)
Take a look (table is too wide) --Azot944 (talk) 20:53, 25 May 2017 (UTC)
There are 24 columns and 8 rows. It could be flipped to 8 columns and 24 rows. 24 columns will always be wide. It could be narrowed a little by only writing thousands, e.g. 92 instead of 91750. PrimeHunter (talk) 21:13, 25 May 2017 (UTC)

Scroll

Is possible the Scroll in horizontal?84.76.135.234 (talk) 13:53, 9 July 2017 (UTC)

Better way to do decimal point alignment?

While working on Atomic clock#Secondary representations of the second, I wanted to do decimal point alignment of a column to emphasize the order-of-magnitude differences between microwave and optical frequencies, and the nested table recommendation at Help:Table#Decimal point alignment is very awkward because you have to specify an explicit column width.

So I played around with CSS and came up with the following. (The example here is simplified by removing references and irrelevant columns.)

Atomic clock operating frequencies
Atom Frequency (Hz)
133Caesium 9 192 631 770  exactly
87Rubidium 6 834 682 610 .904 324
1Hydrogen 1 420 405 751 .766 7
87Strontium 429 228 004 229 873 .4

The column is actually two. The header cell specifies colspan=2, while the body cells specify style="text-align:right; border-right:none; padding-right:0;" and style="text-align:left; border-left:none; padding-left:0;", respectively.

This seems obviously superior to the nested-table construct, in particular letting the browser choose appropriate column widths, but before I go in and change the recommendation, can anyone see any reasons why it's not? E.g. should I leave the existing more awkward suggestion for some special cases? 71.41.210.146 (talk) 14:03, 27 September 2016 (UTC)

I just saw your edit on Atomic clock and found your formatting solution way more elegant than the previous nested table. I see no reason for not changing the recommendation. — Edgar.bonet (talk) 15:25, 27 September 2016 (UTC)
Okay, thanks, I'll WP:Be bold and change it. It's not like an edit is irreversible. 71.41.210.146 (talk) 17:13, 27 September 2016 (UTC)
It seems like a lot of code to use directly. I have made (not documented yet) {{alignd}} to align decimal numbers with the suggested code, and {{alignd column}} to be placed in other cells of the column. The below table looks the same as above but has simpler code. Templates also mean implementation details could be changed later. PrimeHunter (talk) 00:54, 28 September 2016 (UTC)
Atomic clock operating frequencies
Atom Template:Alignd column Frequency (Hz)
133Caesium Template:Alignd  exactly
87Rubidium Template:Alignd
1Hydrogen Template:Alignd
87Strontium Template:Alignd
That's much neater, but "alignd" looks like a misspelling of "aligned". Perhaps something like "aligndp" would be clearer? -- John of Reading (talk) 06:17, 28 September 2016 (UTC)
I haven't tried it, but inspecting this code, and the previous, suggests to me that the full numbers cannot be sorted. If so, this should be mentioned in the documentation. If I needed decimal point alignment and sorting, I would use a right-aligned fixed-width font and a fixed number of decimals (which doesn't work well for vastly different orders of magnitude). -- Michael Bednarek (talk) 08:33, 28 September 2016 (UTC)
Sorting works surprisingly well when it just gets data-sort-type="number" in the header. My limited tests like the below sort correctly by the full number including decimals. PrimeHunter (talk) 10:15, 28 September 2016 (UTC)
Atomic clock operating frequencies
Atom data-sort-type="number" Template:Alignd column Frequency (Hz)
133Caesium Template:Alignd  exactly
87Rubidium Template:Alignd
1Hydrogen Template:Alignd
87Strontium Template:Alignd
1Hydrogen Template:Alignd
1Hydrogen Template:Alignd
Wow, I'm indeed surprised, and withdraw my previous uninformed remarks unreservedly. -- Michael Bednarek (talk) 12:24, 28 September 2016 (UTC)
Presenting {{Decimal cell}}, which takes the value as an actual decimal number, rather than two separate parameters for integer and fractional components as {{alignd}}. That makes it easier to upgrade existing cell values and generally minimizes the surprise or special knowlege required to read/edit the wikitext. And it also takes an optional CSS string that propagates into both subcells. DMacks (talk) 06:26, 25 February 2017 (UTC)
Why not use template:hidden text as it keeps data all in one cell? Rolapib (talk) 12:50, 31 July 2017 (UTC)
Atom Frequency (Hz)
133Caesium
9 192 631 770.000 000
87Rubidium
834 682 610.904 324
Hydrogen
1 420 405 751.766 700
87Strontium
429 228 004 229 873.400 000
1Hydrogen
1 420 405 751.780 000
1Hydrogen
1 420 405 751.700 000

Cyclist results timeline

Can anyone please suggest a better way to display difference between the two types of races. It's a bit of a bodge IMO. This is take from Chris Froome, but is used on a large number of others. BaldBoris 22:41, 20 September 2017 (UTC)

Grand Tour general classification results timeline
Grand Tour 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
Giro d'Italia 36 DSQ
Tour de France 83 2 1 DNF 1 1 1
Vuelta a España 2 4 2 DNF 2 1
Major stage race general classification results timeline
Race 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017
Paris–Nice
Tirreno–Adriatico 2
Volta a Catalunya 71 61 6 71 8 30
Tour of the Basque Country
Tour de Romandie DNF 15 123 1 1 3 38 18
Critérium du Dauphiné 4 1 12 1 1 4
Tour de Suisse 47

Australian classificatory systems. Help needed

There is a glaring gap in wiki devices to tabulate these class/skin divisions which are otherwise described for several hundred tribes. Some are simple (but inadequately represented so far (see the makeshift at Kariera). At the moment, I'd appreciate if someone could give advice as to how one might tabulate the minimal data on the following source page here. Not all of that need go in (e.g. the circle/square design could be left to verbal description inside cells) of course. Thanks and sorry for the bother.Nishidani (talk) 11:57, 21 September 2017 (UTC)

float headers of larger tables?

When I encounter larger tables and I find myself in the middle or bottom of those tables I find myself wondering which column is which. Is there a way that the table headers could float down with the reader as the reader reads through larger tables? --EarthFurst (talk) 19:40, 19 October 2017 (UTC)

Table angular rotation transform

I few months back, I saw a User page that had a table or TOC rotated about 10 degrees (with the contained text correspondingly roatated at the same angle.

I would like to try that, but I neglected to copy down the source or page where I saw that.

Template:Transform-rotate just rotates the text, not the table, which is not what I want.

Any help?

IveGoneAway (talk) 17:18, 7 November 2017 (UTC)

Adjacent tables

Apologies if I skipped over it, but how do you create tables directly next to one another, on the same line? They are both two rows; one has two columns and one has three. If you need a visual, here you are:

Overall record Last Meeting Result
First meeting
Pregame line Over/under
TBA TBA

That's as close as I've been able to get it, but I need the table with white headers to be directly to the right of the table with red headers.

Any help is massively appreciated.

Thanks, PCN02WPS 21:06, 31 August 2017 (UTC)

Overall record Last Meeting Result
First meeting
Pregame line Over/under
TBA TBA
How about this? Set the second table to float right and use Template:clr to keep text from filling up in between.
I have also done the same effect by enclosing the two tables within two cells of a one row table with hidden lines. This also supports finer control of horizontal alignment of the two tables. IveGoneAway (talk) 18:25, 30 November 2017 (UTC) 18:37, 30 November 2017 (UTC)

Row size issue...

Is there anyone that can help me? It seems the size of the rows is glitching in a table I have created. Underneath "Album details", it is always a few pixels out of line on the very bottom line of each row in the column. I borrowed this wikitable format from the Iron Maiden discography page, and it seems to have the same row size glitch on that page in the Iron Maiden discography#Studio albums table, but strangely not the Iron Maiden discography#Live albums table. Even stranger, the glitch doesn't appear when I am in the "Show preview" screen while editing...

List of studio albums, with selected chart positions
Year Album details Peak chart positions
US
Hard Rock
US
Rock
US
Top Sales
US
Ind.
US
Heat.
2012 The Palpable Leprosy of Pollution
  • Released: 12 December 2012
  • Label: Self-released
  • Format: CD, LP (limited-print re-release), digital download
2016 The Elysian Grandeval Galèriarch
  • Released: 29 July 2016
  • Label: Self-released
  • Format: CD, CS, LP, digital download
7 22 90 14 4
"—" denotes releases that did not chart or were not released in that country.

Tha†emoover†here (talk) 03:35, 19 April 2018 (UTC)

The glitch doesn't appear to be showing up here, but for me it shows up at User:Thatemooverthere/Infant_Annihilator#Discography and at Iron Maiden discography#Studio albumsTha†emoover†here (talk) 03:36, 19 April 2018 (UTC)

Auto calculation

It is possible in the final row of the total? --Kasper2006 (talk) 08:47, 28 June 2018 (UTC)

There is no feature to automatically calculate the sum of table cells. If all the cells are made by the same template then the template can make another cell with the sum but constructing such a template is usually harder than calculating the sums manually. mw:Help:Extension:ParserFunctions##expr can be used to calculate a sum but each number has to be input to #expr and cannot be read automatically from a cell. PrimeHunter (talk) 10:56, 28 June 2018 (UTC)
tnx for your answer --Kasper2006 (talk) 17:34, 28 June 2018 (UTC)

Non-rectangular tables example broken

Resolved
 – Resolved-ish. The bug isn't in the table formatting, it's in one of the wiki Gadgets.

The last table in § Non-rectangular tables is rendering broken in both Firefox and Chrome, and to be honest I can't figure out what it's trying to do in order to fix it. Here's the current example:

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)

Looking at the code... heck, looking at the table... I have no idea what it's trying to achieve, and why it would need to be a "non-rectangular table". -- FeRD_NYC (talk) 16:57, 18 June 2018 (UTC)

It looks reasonable to me, if the point is to simulate a single tall-but-narrow table that flows into multiple columns. I agree that "non-rectangular" is a confusing section heading (all of them look rectangular!). DMacks (talk) 08:57, 28 June 2018 (UTC)
It looks like three tables side by side but is actually a single table with two blank columns. I guess the point is that there is no rectangular border running around the whole table. PrimeHunter (talk) 10:49, 28 June 2018 (UTC)

Perhaps we're seeing different things. Here's how it's being rendered in Linux Chrome, for me (this is actually a screenshot of the copy embedded above on the Talk page, but the rendering in the article is the same): https://imgur.com/a/Z5MJP3W -- FeRD_NYC (talk) 15:59, 28 June 2018 (UTC)

Realized I should've mentioned I was responding to both @DMacks: and @PrimeHunter: -- FeRD_NYC (talk) 16:01, 28 June 2018 (UTC)
Wow, that's broken. Looks correct for me on Firefox and Safari on Mac. In the coding, the first row has rowspan=5 attributes on each of the spacer title cells, but for you that is not being extended beyond that first row. Let's try to diagnose the browser effect. Does the following have "woof" only in the top row or vertically centered in the whole table?
Year Size woof Year Size woof Year Size
1990 1000
(est)
2000 1357 2010 1776
1991 1010 2001 1471 2011 1888
1999 1234 2009 1616 2019 1997
(est)
I know some browsers did/do have differences rendering cells that have no content. DMacks (talk) 16:13, 28 June 2018 (UTC)
@DMacks: That latest version looks exactly the same as my screenshot (shape-wise — the header row is sticking out two spaces over the right edge), with "woof" filled in to both of the formerly-blank spaces in the header row. But the overall shape is unchanged. That's in Linux Chrome 67. Linux Firefox (56, the older platform) is basically the same. -- FeRD_NYC (talk) 16:31, 28 June 2018 (UTC)
@DMacks: Oh, hang on... after spinning up a Windows7 VM, I saw the correct rendering there... until I logged in. This is clearly an issue with my Wikipedia account specifically. I'll hunt down whatever settings or user CSS is breaking this and clear it out. Apologies for the wild goose chase. -- FeRD_NYC (talk) 16:41, 28 June 2018 (UTC)
Yeah, for future reference, the "Make sure that headers of tables remain in view as long as the table is in view (requires Firefox v59 or Safari)" switch in Special:Preferences#Gadgets§Testing and development and rowspan headers are not friends, no matter what browser you're using. -- FeRD_NYC (talk) 16:52, 28 June 2018 (UTC)
Marking resolved. -- FeRD_NYC (talk) 17:23, 28 June 2018 (UTC)
Good detective work! I just confirmed that turning that feature on/off has the same break/unbreak of these tables. I'll leave a note at MediaWiki talk:Gadget-StickyTableHeaders.css. DMacks (talk) 19:24, 28 June 2018 (UTC)
After some (very appropriate) pushback from the gadget developers, and extensive investigation into the output generated by the wikitable, I concluded that the bug was in our example. It was using rowspanned column headers, which resulted in an invalid table structure that was then exposed by the gadget. I've updated the code of the example to properly structure the table using rowspanned data cells, instead. -- FeRD_NYC (talk) 13:09, 5 July 2018 (UTC)

Any table expert around?

Hi guys. I need help with creating a table based on this image. Anyone? --Saqib (talk) 10:06, 10 July 2018 (UTC)

@Saqib: Here is a wikitable where the first row is a header row. It may render small because the cells are currently empty. PrimeHunter (talk) 12:47, 10 July 2018 (UTC)
A section B section
1 1
2 2
3 3
4 4
5 5
6 6
7 7


Great. thank you @PrimeHunter:. I will try this table and ask you question, if any. --Saqib (talk) 12:56, 10 July 2018 (UTC)
@PrimeHunter: A question. How can I add more rows in section B. Lets says I need 7 rows in A section but 10 rows under section B. I hope you get it? If you look at the image, there're 8 rows in right section.--Saqib (talk) 13:08, 10 July 2018 (UTC)
@Saqib: Can you use this with a big blank cell at the end of A:
A section B section
1 1
2 2
3 3
4 4
5 5
6 6
7
8
9
Or this:
A section B section
1 1
2 2
3 3
4 4
5 5
6 6
7
8
9
Rows go across the whole table. If you want the A and B sections to have different arbitrary row heights without row alignment between the sections then it cannot be done with a single table. PrimeHunter (talk) 18:52, 10 July 2018 (UTC)
@PrimeHunter: I was able to create a table without row alignment, but was unable to add those 2 columns. Maybe you can help? --Saqib (talk) 05:24, 11 July 2018 (UTC)
Table
A section B section
1 2 3
4 5 6
7 8 9
@Saqib: If you accept aligning a single A section row with two B section rows then here is a solution where it's done for the last three A section rows, but it could be any three rows. PrimeHunter (talk) 10:24, 11 July 2018 (UTC)
Table
A section B section
1 1
2 2
3 3
4 4
5
5 6
7
6 8
9

I've noticed that on Football Player Club Statistics tables, the penultimate row is.. odd. Take for example Hugo Lloris. You'll notice that the "206" value (his total appearances for Tottenham) is not under the "Apps" column, and the total listed for this column, 0, is his Goals total. The cell for Tottenham Hotspur is rowspan 7, so it should be going one row further down, and thus shifting everything to the right location, but it seems something in the JavaScript is "fixing" this (I happened to notice due to a slower than usual page load which jumped the row one column to the left..). Any ideas if anything can be done to fix this? It's the same on a lot of other players too, and on some other tables I've seen that may be related to this issue. --Philk84 (talk) 21:48, 16 July 2018 (UTC)

@Philk84: I guess you have enabled "Make sure that headers of tables remain in view as long as the table is in view" under the "Testing and development" heading at Special:Preferences#mw-prefsection-gadgets. This gadget does not work properly for tables where header rows use rowspan. See MediaWiki talk:Gadget-StickyTableHeaders.css#Bug: rowspan in headers does not propagate into table and #Non-rectangular tables example broken. The gadget is disabled by default and is only an option for logged in users. PrimeHunter (talk) 22:33, 16 July 2018 (UTC)
Thanks @PrimeHunter:, I don't recall setting that option before, indeed many of the preferences that are enabled I don't remember setting, so I'm not sure what's going on there. I've disabled that option and it is indeed working. --Philk84 (talk) 06:54, 17 July 2018 (UTC)
@Philk84: @PrimeHunter: Hah! Now, that's a really interesting case. The issue once again is, same as with the table that started that previous discussion, the table structure as rendered into HTML is invalid. But in this case it's because the entire last two rows are being subsumed into the table footer. This is actually a much trickier case, I'm not sure of exactly the right way to fix it... the table design needs some tweak to break the next-to-last row out of its "header row" status, so that only the very last row is considered the table footer. -- FeRD_NYC (talk) 17:15, 19 July 2018 (UTC)
Got it! I can fix the table layout, if you don't mind the Club entries being slightly off-center vertically. See the first section of User:FeRD_NYC/sandbox. They'll actually line up with the Division text, after this change, which arguably looks better anyway. I've only adjusted the Tottenham Hotspur block, in the example, but in the article I'd also fix up the rest of them (though it's not strictly necessary for this issue) so there's consistency with the vertical alignment. -- FeRD_NYC (talk) 17:24, 19 July 2018 (UTC)
Scratch that last statement, I adjusted the entire table to give a better idea of the final layout. -- FeRD_NYC (talk) 17:35, 19 July 2018 (UTC)

Table overlapping with text

For some reason, the tables at WP:Finland started overlapping with text? After a quick round of troubleshooting I have no idea what is wrong. Any help from more experienced editors? 86.115.14.101 (talk) 17:08, 22 July 2018 (UTC)

@86.115.14.101: It wasn't the table, it was the fact that they were using Template:float to align it. I've switched that to Template:align, and the issue is corrected. -- FeRD_NYC (talk) 21:49, 24 July 2018 (UTC)

Row operations

I have been editing since 2006, with over 7,000 edits. The section "Row operations" contained three subsections each of which contained only a link to another section in this Help Page, the gave absolutely no help at all. E.g. row alignment points to table alignment. I removed it in the hope of getting the attention of an editor who knows why this is so and who will insert text explaining why, when they restore this section. Sorry for the blunt knife, but even now I do not know how to alert expert editors to something that definitely needs clarification. I hope I have not offended, nor crossed some frobidden boundary, but I really think it is important to improve the "Row operaions" section with some comment such as "all rows must share common features with the entire table, so there are no distinct 'row operators' rather these operators are all 'table operators'." I would insert that myself but I am not sure that is true. Nick Beeson (talk) 11:58, 20 November 2018 (UTC)

Scope failure

Could someone who knows edit this help page to describe why

scope="row" style="font-weight: normal; text-align: center;"

centers the first four columns' text content but does not center the last three columns' text content which contain only digits? I could not find any explanation, and I do not understand this behaviour. Thanks, Nick Beeson (talk) 11:58, 20 November 2018 (UTC)

@Nick Beeson: Please say which page it is about when you ask for help. I guess it is Mönchengladbach#Football stadium. The old version had the quoted code in the first cell of a row so the style only applied to that cell. The next three cells were left-aligned. You probably thought they were centered because the column was only as wide as the content in that row. I cleaned up some bad table code.[4] scope="row" identifies a row header cell. It does not mean that adjacent code applies to the whole row. Code for a whole row is placed in the row declaration. PrimeHunter (talk) 18:55, 20 November 2018 (UTC)

Problem with floated table

Hello,

I noticed a problem with the following table format:

{|class="wikitable floatright"
!first row
!style="width:12em"|second row
!style="width:10em"|third row
|-
|item1 ||Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.|| At vero eos et accusam et justo duo dolores et ea rebum. 
|-
|item2||Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. ||Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.
|}
first row second row third row
item1 Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
item2 Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.

This table shows up nicely on the right side in Firefox (with text flow around it) but in Chrome the first row is extraordinaryly large and the table occupies the entire page width. Is there anything wrong with the syntax? I could not find an error. Thanks for any help! --Furfur Diskussion 21:16, 20 February 2019 (UTC)

Confirmed here – I see the same thing as described above here in FF and Chrome, latest versions. -- Michael Bednarek (talk) 05:37, 21 February 2019 (UTC)

Help Request

Hi folks. I'm struggling a bit with a table. Could someone advise me where I may have gone wrong? Also, how would I get the text to show "pending" rather than the red nominated? User:Mark E/Sandbox. Thanks! Mark E (talk) 12:44, 6 March 2019 (UTC)

@Mark E: If {{nominated}} is on a line by itself, it needs just one | in front of it, as on the last line of your table. If you are placing it on the same line of wikitext as the previous table cells, it needs two: || . To make a cell say "pending" you write {{pending}} - if you follow that link and scroll down, you'll see a long list of similar templates. -- John of Reading (talk) 13:08, 6 March 2019 (UTC)

Horizontal row of tables

I'm copyediting Household, which has many, many tables running down the left side of the page. I'd like to arrange two or three narrow, related tables across the page to minimize whitespace, and haven't found instructions here or at WP:ADTABLE. Is there a way to do that? Thanks and all the best, Miniapolis 16:52, 15 March 2019 (UTC)

Help:Table#Positioning says "You can also place tables side by side by adding style="display: inline-table;" to the opening of your table." PrimeHunter (talk) 18:03, 15 March 2019 (UTC)
Thanks, PrimeHunter; I missed that. All the best, Miniapolis 14:03, 16 March 2019 (UTC)

Best practice for yes/no column?

Are there any best practices for how to represent true/false or yes/no values in a table? Some examples:

Person Cool
John Smith
Jane Doe
Person Cool
John Smith No
Jane Doe Yes
Person
John Smith Uncool
Jane Doe Cool


The first seems clearest, but I couldn't find any guidance and can't actually recall seeing any tables set up like that, so I just wanted to get others' opinions. Thanks! ╠╣uw [talk] 18:57, 24 April 2019 (UTC)

@Huwmanbeing: {{Yes}} and {{No}} are used a lot:
Person Cool
John Smith No
Jane Doe Yes

-- John of Reading (talk) 19:05, 24 April 2019 (UTC)

Make the header not go off the screen

Is there a way to make the top row not stay out of the screen in long tables? Is it possible to make it follow the scrolling? I hope you know what I mean --Bageense(disc.) 14:56, 31 May 2019 (UTC)

Not for others on a specific table. For your own account on all tables, Special:Preferences#mw-prefsection-gadgets has "Make sure that headers of tables remain in view as long as the table is in view". Some tables are malformed by the gadget per MediaWiki talk:Gadget-StickyTableHeaders.css. PrimeHunter (talk) 15:11, 31 May 2019 (UTC)

How can edited a table

How can i get a full detail on how to created my own page Jomolado (talk) 19:03, 30 August 2019 (UTC)

The help page overleaf gives a very detailed explanation of the wikitext coding required. It also shows a side bar at the right top (Wikitext) with further links to helpful pages. -- Michael Bednarek (talk) 04:35, 31 August 2019 (UTC)

How may i understand that , without practice Jomolado (talk) 08:00, 31 August 2019 (UTC)

I need a practica that i can use to do my own to get more assurance Jomolado (talk) 08:02, 31 August 2019 (UTC)

I neeed a link on internet , that we bring more understand too me Jomolado (talk) 08:04, 31 August 2019 (UTC)

So that people i know may understand that, which we give me motivation to teach them on how to it , an if there is knw understnd about it there we be know knowlege about, i need a goood idea Jomolado (talk) 08:08, 31 August 2019 (UTC)

See Help:Starting editing, Help:Getting started, Help:Guided tours, and further links found there. Maybe the introduction at Help:My sandbox or WP:SANDBOX will help. -- Michael Bednarek (talk) 11:13, 31 August 2019 (UTC)

Problem with two-line headers in a sortable, collapsible and collapsed table

Hello,

The following type of table worked at least in July, but not anymore as the second header line does not render (header that says Column 1, 2, and 3). Something seems to have changed in MediaWiki? This has nothing to do with a browser.

Example table with code
{| class="wikitable sortable collapsible collapsed"
|-
! colspan="3" | Top header
|-
! Column 1
! Column 2
! Column 3
|-
| Data 1
| Data 2
| Data 3
|}

If you remove either "sortable" or "collapsed", it renders the sub-header:

Example tables and code one with "sortable" removed andthe other with "collapsed" removed
{| class="wikitable collapsible collapsed"
|-
! colspan="3" | Top header
|-
! Column 1
! Column 2
! Column 3
|-
| Data 1
| Data 2
| Data 3
|}
{| class="wikitable sortable collapsible"
|-
! colspan="3" | Top header
|-
! Column 1
! Column 2
! Column 3
|-
| Data 1
| Data 2
| Data 3
|}
Top header
Column 1 Column 2 Column 3
Data 1 Data 2 Data 3

However, the first type of table did work just fine in July. What gives? Zarex (talk) 14:55, 2 September 2019 (UTC)

@Zarex: It varies for me between page views (especially when previewing). Sometimes I see the row and sometimes not. This indicates it may depend on loading order of the JavaScript. This order can vary between views. PrimeHunter (talk) 19:49, 2 September 2019 (UTC)
I also noticed after posting my message that the first table worked fine on this talk page, but in preview while editing my message, it did not (and still does not work in preview). And the article I've been working on is still having this issue. So is there anything you can do, or is it pure luck when it happens? Zarex (talk) 21:51, 2 September 2019 (UTC)
@Zarex: I don't know enough JavaScript to do something. Wikipedia:Village pump (technical)/Archive 86#Table show/hide disfunction from 2011 is also about problems combining sortable and collapsible like the discussed template did at the time [5]. Eight years is a long time but load order was also mentioned there by TheDJ who is still active. Help:Collapsing#Sortable tables claims it works without difficulty but the example only has one header row. PrimeHunter (talk) 22:19, 2 September 2019 (UTC)

Chrome vs Firefox vs Edge in tables - help needed

Could someone using Chrome check out the discussion we are having at Talk:Bianca Andreescu career statistics? When looking at the performance table... specifically the "Hardcourt Win–Loss" row, or "Overall Win–Loss" row, we have a user using Chrome that says some of the columns wordwrap. I have Chrome, Firefox, and Edge, with standard settings, and they all look perfect... no wordwrap. He uses Chrome and items such as 34–13 wraps itself. Just trying to figure things out. Thanks. Fyunck(click) (talk) 04:07, 10 September 2019 (UTC)

The problem was buried in the Chrome regional settings. I had no idea it could affect table cell widths. Fyunck(click) (talk) 08:20, 10 September 2019 (UTC)

Years not sorting properly

I'm working on a table (User:Kaiser_matias/sandbox1#Goaltenders), and for some reason the "Tournament" column is not sorting properly. It should work chronologically from the earliest/latest year, regardless of how many years are input, but for some reason it is messing up with the multiples. I have had this work before (see List_of_Olympic_men's_ice_hockey_players_for_the_Czech_Republic#Goaltenders for a most recent example), but am at a loss here. Kaiser matias (talk) 22:29, 2 November 2019 (UTC)

@Kaiser matias: "1960, 1964" is interpreted as an 8-digit number by the sort code. It happens in this table but not the other example because the first five rows only have normal numbers so the code tries to interprete all cells as numbers per Help:Sorting#Configuring the sorting. In the other table, the third row "1998, 2002, 2006" does not look like a number so the code chooses to sort the column as text. 4-digit years sort correctly as text. The easiest solution is directly asking to sort the column as text with !scope="col" data-sort-type="text"|Tournament(s) in the column heading per Help:Sorting#Forcing a column to have a particular data type. PrimeHunter (talk) 22:58, 2 November 2019 (UTC)
@PrimeHunter: Thanks a lot for your help with this, I really appreciate it. Kaiser matias (talk) 22:14, 4 November 2019 (UTC)

Long tables wrapped into multiple columns

At Automobile drag coefficient we have a rather long but narrow table that has been manually divided into 3 parts and each part put into a 3x1 side-by-side table. As entries have been added, each of the 3 parts has become a different height and it looks very unprofessional. I tried joining them back into a single table and wrapping it with {{div col|colwidth=10em}} and {{div col|colwidth=30em}}. See https://en.wikipedia.org/w/index.php?title=Automobile_drag_coefficient&oldid=899773674 , I reverted this immediately. The results are passable but the headers are lost on the 2nd, 3rd, etc columns and multi-line cells are sometimes split between columns. Is there a better way to do this?  Stepho  talk  08:12, 1 June 2019 (UTC)

To editor Stepho-wrs:
Apologies if this is stale.
I'm not quite sure exactly from reading the above what the desired end-state is. I checked the diff & scrolling did not observe anything split between columns, could you be a bit more specific? If the problem with the change you tried was loss of a different header for concept/experimental, that can be remedied by placing a second table below the first thereby preserving its header, or if they must be combined by inserting a new header row.
Alternatively if you want to preserve the compactness of having the three side-by-side instead of a single long table, there's probably some a way to get the cells to align with the right combination of parameter values and templates. However, I don't see how you expect to get the last table the same length as there are less than half as many experimental as production vehicles listed. That is unless your intent was to add empty rows to the third column. Would you mind clarifying for me, thanks. (please ping on reply)
P.S. Please allow a few days for replies, I can usually respond within the week, thank you.
𝒬𝔔 02:08, 10 January 2020 (UTC)