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 (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

Centering a column[edit]

Maybe I'm just overlooking this...when I center a column, I go through the table rows and align the text to be centered in the column I want centered. Is there a way to center a column that's easier? --hmich176 09:21, 27 November 2014 (UTC)

@Hmich176: Judging by Help talk:Table/Archive 5#Centered Text in One Column Only, no. HTML does provide such means (the <colgroup>...</colgroup> and <col /> elements) but these are not permitted in Wiki markup. --Redrose64 (talk) 12:43, 27 November 2014 (UTC)
@Redrose64: That's what I suspected. Can anyone answer the technical reason why Wiki markup doesn't have the ability to do this? I'm curious to see an answer. Thanks! --hmich176 14:47, 27 November 2014 (UTC)
Those HTML elements are not whitelisted in Sanitizer.php. --  Gadget850 talk 17:22, 27 November 2014 (UTC)
An interesting question is why they are not been sanitized. I can't see any particular logic in the decision, but perhaps there is. --Mrjulesd (talk) 20:59, 27 November 2014 (UTC)
Yes, I understand that it's not whitelisted, and I'm sure there's some logical reason for that. I would like to understand the technical reasoning. --hmich176 09:18, 30 November 2014 (UTC)
It may just be that the matter has never been considered. A better solution, if there are any developers interested, would presumably be to incorporate such an option into the wiki table syntax (which generally doesn't use HTML tags on the surface). W. P. Uzer (talk) 18:30, 30 November 2014 (UTC)

improve example on table row linking[edit]

Hi, i just came here to learn how to set up a table row anchor and link to it. It worked for me in setting up link to List of museums in Florida#Table row MuseumOfSpeed. Thank you to past editors here.

But, in the section Help:Table#Section link or map link to a row anchor, the map example is a bit confusing, and is less than perfect example of practice in some ways. Specifically it gives example of link for Slovenia to jump to table row 11. The reader (me) is confused whether a) the link is literally going to count its way to the 11th row appearing in the table, or b) the link will jump to the number 11 in the possibly very important first column of the table, or c) the link will jump to whichever row is anchor-named as "table row 11". C is apparently the answer. The example need not introduce that confusion. And it is poor table-row-naming practice, IMO, to use the hard-coded number "11" in the anchor-name rather than using "Slovenia". If another row is inserted into the table, or if a future editor chooses to re-organize the table into a different order of entries, it would mess up correspondence of anchor-names to re-numbered row numbers to be displayed in the table. Updating all links within the article holding the map and table, and all links from other articles to the table rows, in order to restore a clear correspondence, would be a nightmare possibly. It would be far better for the anchor-name to be "table row Slovenia" than "table row 11".

I am inclined to edit the example to use "table row Slovenia" and the like, but will pause for comments. I'm a newbie here, would be happy to receive comments or suggestions. --doncram 23:05, 18 December 2014 (UTC)

Question on sorting[edit]

Letter Number
A 4
B 1
C 3

In a sortable table like the above one, when you click on the second any column's header to sort by that column's contents the contents of the cells of the first column will be split and doubled. Is there any way to code such a table that it only splits if you sort on the second column and that if you sort back on the first column after having sorted on the second column the cells that were split in two are merged again to their original state? Tvx1 02:20, 1 March 2015 (UTC)

@Tvx1: No. You would need to file a feature request at phab:. --Redrose64 (talk) 23:28, 1 March 2015 (UTC)
@Redrose64:, could you give me some advice on how to file such a request in a good manner? Tvx1 00:16, 2 March 2015 (UTC)
If you follow that link, you should find near the top a box titled "Getting Things Done", containing two links, "Report a Problem" and "Phabricator Help". I would start there. --Redrose64 (talk) 00:20, 2 March 2015 (UTC)
Yes, I can find how to report a bug, but I can't find any information regarding requesting a feature. Tvx1 00:32, 2 March 2015 (UTC)
"Report a Problem" is also used for feature requests. See more at mw:How to report a bug#Reporting a new bug or feature request (the method there reaches the same link as "Report a Problem"). Sorting issues are better discussed at Help talk:Sorting than here at Help talk:Table. I don't know whether your issue has been discussed before. PrimeHunter (talk) 00:56, 2 March 2015 (UTC)

Putting image and table into a single line[edit]

When a table is not very wide, it takes up a lot of vertical space for not much material. I am wondering if it is possible to place a table inline, so that text flows around it (without turning it into an image), or else to share a single line between a table and an image. I can do the latter through nested tables, but these are discouraged.

Is there any other way to do either of these things? Here is the table:

Recognized independent Waldorf schools by continent
Continent Schools Countries
Africa 22 5
Asia 58 12
Europe 692 34
North America 150 3
Oceania 52 2
South America 67 6

And here is the image it could share a line with:HGilbert (talk) 13:06, 30 March 2015 (UTC)

Growth of Waldorf schools
Growth in the number of accredited Waldorf schools in the world from 1919 to 2012

Recognized independent Waldorf schools by continent
Continent Schools Countries
Africa 22 5
Asia 58 12
Europe 692 34
North America 150 3
Oceania 52 2
South America 67 6
Growth of Waldorf schools
Growth in the number of accredited Waldorf schools in the world from 1919 to 2012

Try style="float:left;".
Look at the source. --Mrjulesd (talk) 13:26, 30 March 2015 (UTC)
Perfect; thanks! HGilbert (talk) 13:49, 30 March 2015 (UTC)

Help resizing table[edit]

Hi, I'm having trouble resizing List of municipalities in Ontario#Local municipalities using the following code since the columns resize automatically to some default regardless how I set the width manually.

"{|class="wikitable sortable" ! scope="col" width="50px" | Name"

I'm trying to shrink the columns to allow the images to straddle on the right of the table, as in this similar page List of municipalities in Alberta

Any help would be greatly appreciated. Mattximus (talk) 18:06, 9 May 2015 (UTC)

First, never assume that anybody else's screen is the same width as yours. The chances are that it's not: so even if you get a table to look "right" on your screen, it will probably look wrong for other people. For that reason, it's best to avoid fixed column widths altogether, and let the other person's browser arrange the columns to suit the available space on that screen.
If you can't get away from set column widths, don't set an absolute width like 50px - you don't know the font size on the other machine, it may turn out that 50px is too narrow, even for a short word like "Name". So use percentages instead. When setting percentage widths, make sure that those columns that you do give a width to add up to less than 100%, and always leave at least one column unsized, this is to make sure that the browser can still adjust where necessary. --Redrose64 (talk) 20:09, 9 May 2015 (UTC)
Whether or not images straddle on the right of the table doesn't have to much to do with the coding of the table. It's a result of the size of you're browser's window. I can go from the images stocking on top to the images nicely straddling next to the table to a massive whitespace in-between the table and the images on the right just by expanding my browser's window. Tvx1 11:50, 10 May 2015 (UTC)
Thanks for your replies. So it seems there is no way to code a table so that the images straddle nicely to the side on most monitors? Mattximus (talk) 22:12, 12 May 2015 (UTC)
The problem is how we are going to define "most monitors". I even if we are able to do so, not every user who has the same size of monitor is going to use the same screen resolution setting on that monitor.

uneven rowspans[edit]

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 will be deleting User:Gadget850/wikitable in a few weeks. If anything seems useful, grab it and use it. -- Gadget850 talk 23:04, 27 May 2015 (UTC)