Help talk:Table

From Wikipedia, the free encyclopedia
Jump to: navigation, search
the Wikipedia Help Project  
WikiProject icon This page is within the scope of the Wikipedia Help Project, a collaborative effort to improve Wikipedia's help documentation for readers and contributors. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks. To browse help related resources see the Help Menu or Help Directory. Or ask for help on your talk page and a volunteer will visit you there.
 ???  This page does not require a rating on the project's quality scale.
 ???  This page has not yet received a rating on the project's importance scale.
 

Table Overflows Into Right Margin[edit]

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[edit]

This help page has too many unordered information in it. I'd suggest a massive clean-up. If you dont 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

Maximum number of rows[edit]

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[edit]

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)

Bottom/Footer[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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[edit]

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)