Help talk:Table/Archive 3

Latest comment: 13 years ago by Tigey in topic Conditional Table Row
Archive 1 Archive 2 Archive 3 Archive 4 Archive 5 Archive 9

Column equivalent to line word wrap for long two column tables

I have a two column table where I can sort on each column and each column is of minimal width. So with my many entries I get a very long but narrow table and so have to scroll up and down many pages to find my entries as I switch back and forth between sorts. How can I make the length of the page presentation shorter by breaking the long table into three (or even more) parts that are beside each other and still be able to have the sorts include all row data from my original long table? I will also post this at the Help desk. (Also, not sure if I should post at top or bottom of this page - let me know - thanks.) Newwhist (talk) 00:41, 7 June 2009 (UTC)

Entire cell is a link?

Is it possible to make the entire cell a link? I was hoping to build a large grid where the background color of each cell indicates a status, and is a link. Is this possible or would I have to do something like

{|
|-
|[[User:na85/link| ]]
|}

?

Na85 (talk) 09:57, 15 January 2009 (UTC)

Table title overlapping with text

In the article European Patent Convention, the table title "Contracting States to the European Patent Convention, with respective date of entry into force" overlaps with the text (I am using Firefox 3.0.5 on Windows Vista). Can anybody help me to solve this? Thank you in advance. (The problem does not arise using Safari 3.2.1, while the layout on Internet Explorer 7.0.6001... is just awful..) Cheers. --Edcolins (talk) 13:12, 24 January 2009 (UTC)

I'm also using Firefox on Vista (Home Premium), and I can reproduce the problem (as non-logged in user too). I had to change the window width just right until the "Contracting States to" text completely overlaps the "does not totally overcome" text in Background and rationale. Netscape 9.0.0.6 (I use to simulate Firefox 2 behaviour) has a much reduced overlap of just 2 or 3 pixels. Opera 9.63 has no problem. I dare not open IE as it has given me much grief. My guess is Mozilla still has improvements to make with layout. Someone (not me, I'm lazy today) needs to create a html fragment that reproduces the problem and submit a bugzilla report. 78.14.225.21 (talk) 13:21, 25 January 2009 (UTC)
Any other idea to solve this? --Edcolins (talk) 17:30, 14 February 2009 (UTC)

Useless section

The Wikitable as image gallery section is completely unintelligble. It needs to be rewritten by a native English speaker. SharkD (talk) 01:01, 27 January 2009 (UTC)

  • 15-April-2009: I wrote that section, and I AM a native English speaker. However, I have been editing Wikipedia articles for 4 years (also translating with German Wikipedia, where some of those images are used), so that section "Wikitable as image gallery" has been placed near the bottom of the article, as a subject intended more for long-term users. That is a typical tactic, as a help-page progresses, the topics can become more specialized, but cover many details not addressed at the introduction. -Wikid77 (talk) 22:18, 15 April 2009 (UTC)

Swap columns in large tables?

Is there a way to easily swap two columns over in a table? In the past I've done this by hand, but that takes a long time for large tables. Thanks. Mike Peel (talk) 14:49, 14 February 2009 (UTC)

Copy it to Excel or OpenOffice Calc, make your changes, then use the Excel-to-Wiki Converter. --—— Gadget850 (Ed) talk - 15:36, 14 February 2009 (UTC)

How do i centre whole columns in a table?

Is this possible? Thanks, IAmTheCoinMan (talk) 15:05, 14 February 2009 (UTC)

1. Images and right-floating tables 2. Borders and cellpadding

Two problems:

1. How can I locate images to the right when there is already a right-floating table (a chronology)? I have used a table kludge at the top of Dura-Europos. I hope there's a better more consistent way. There are a few other images that I have moved left because of the chronology, but would like on the right and if there is a better way I'd happily use it. Using a table will make editing difficult.

2. How would I get a table which was a border like class="wikitable", but which allows me to use cellpadding. When I tried cellpadding to give text a bit of air in a wikitable, it didn't work. So, how would I get both cellpadding and a fine border?

Thanks for any pointers. -- spincontrol 21:53, 21 February 2009 (UTC)

  • 10-April-2009: For problem 1, a single image can be placed in a floating-table (style="float:right;"). To explain the details, I added an entire section to the "Help:Table" page; see:
Help:Table#Floating images in the center.
For problem 2, use style="border:1px solid #CCC" as noted in another section I added; see:
Help:Table#Setting borders.
Apparently, those 2 problems are quite common, and I happened to address both of them when expanding the Help:Table page. -Wikid77 (talk) 00:21, 11 April 2009 (UTC)

Coloured columns

I've created People who have served in both Houses of the Australian Parliament, and I want to colour some of the columns. I want the 3 columns under Senate to be a light red or pink and the 3 columns under House of Representatives to be a light green. These colours reflect the colours used by those chambers, and this will make the table more readily comprehensible.

I think I've worked out how to colour a single cell, but there seems to be no info on how to colour an entire column in a single command. I don't want to have to apply colour to every cell separately. Is there a quick way to do this that has escaped my notice? Thanks. -- JackofOz (talk) 03:06, 24 March 2009 (UTC)

Ultimately, each box must be colored separately. However, this can be eased by using a table editing tool, such as an HTML editor, capturing the resulting HTML table, and replacing the table in the article with it. Needless to say, this will be ugly wikitext and a pain to maintain. There are tools for converting HTML tables to wikitables, but the underlying complexity will remain. Another method would be to use templates in the cells to provide colors, such as at periodic table (standard). —EncMstr (talk) 04:15, 24 March 2009 (UTC)
I was afraid that would be the answer. Isn't it a bit odd that a row can be coloured with one simple command, but a column can't? Given the number and variety of tables in WP, it's very surprising that some attention hasn't been paid to this issue before now. Thanks anyway.
PS. Maybe it would be good to state explicitly that column colours have to be done this way, rather than having people have to scout around for the information and needing to ask the question. Just a suggestion. -- JackofOz (talk) 05:35, 24 March 2009 (UTC)

Added subsection: Setting borders

8-April-2009: I have added subsection "Setting borders" as a new subsection about using the typical thin, solid box-borders. It has a few short examples about putting borders around the table, or individual cells, using a style-parameter (style="border:1px solid darkgray;"). -Wikid77 (talk) 21:56, 8 April 2009 (UTC)

Archived rest of 2007

10-April-2009: I have moved the remainder of 2007 topics into the Archive_1 page, to keep all of 2007 in one archive file. If a topic isn't covered on this page, the archive file might have that topic, with answers or examples.

I kept 2008's topics in this file for easy review of answers/examples. -Wikid77 17:41, 10 April 2009

I went ahead and archived 2008 and added the archive banner. Show will give you the links and the search box. --Gadget850 (talk) 23:18, 10 April 2009 (UTC)

2nd generation Help:Table

10-April-2009: I have begun reformatting the Help:Table page, as a 2nd-generation level, to expand more about setting table borders, describe image formatting, and condense the page by shortening examples and removing excess blockquote boxes. The changes are as follows:

  • added new section "Setting borders" - to explain the thin/solid borders.
  • added new section "Floating images to the center" to show use of the style="float:right" (or "float:left").
  • moved section "Displaying the table code which generates a table" into new page named "Help:Display markup examples".
  • removed 27 blockquote boxes that double-boxed the wiki markup code.
  • at Comparison of HTML syntax, narrowed the table width=590px & removed the 2nd "Data cell" and second Sample table of 6 items.
  • at Comparison of HTML syntax, updated the Pros/Cons area, noting that some indented HTML code might not match the nesting, and putting "tr" for a "td" can cause confusion for hours.
  • for the simple examples, changed red highlighting to medium brown ("#AA6633") to avoid red-linked appearance.

The intent is to broaden the coverage of Help:Table, while streamlining the level of detail to avoid excessive formatting. Although more than 350 small changes have been made, the overall effect is a massive copyedit activity, while adding or removing sections, but NOT a radical change in appearance. The page will still seem generally familiar to previous readers. -Wikid77 (talk) 00:21, 11 April 2009 (UTC)

tables within text?

Hi! Is there a way to use tables within paragraphs, similar to the way we can use images? What I want to do is something like this [with image]

Hohhot (Mongolian:  , Kökeqota; Chinese: 呼和浩特; pinyin: Hūhéhàotè), sometimes spelled Huhehot or Huhhot, is a city in North-central China and the capital of the Inner Mongolian Autonomous Region, serving as the region's administrative, economic, and cultural centre. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc.

but with the image replaced by a table.

[not like this - the table should be between the "Mongolian" and the "Kökeqota", not somewhere outside the paragraph!]

 
 
 
 
 
 

Hohhot ([] Error: {{Lang-xx}}: no text (help) Kökeqota; Chinese: 呼和浩特; pinyin: Hūhéhàotè), sometimes spelled Huhehot or Huhhot, is a city in North-central China and the capital of the Inner Mongolian Autonomous Region, serving as the region's administrative, economic, and cultural centre. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc. etc.

Is there some way to achieve this? Yaan (talk) 13:52, 15 April 2009 (UTC)

27-Apr-2009: For years in HTML, a table has always forced an implicit line-wrap (or line-break), so to keep a table within a line, the work-around is to put the whole line into a table, then imbed a table-within-a-table, using the outer table to force the whole line to stay together. I have created a new sub-section, under the "Examples" section; see:
For more flexibility, those examples use the standard HTML tags "<table>" & "<tr>" & "<td>". -Wikid77 (talk) 22:41, 27 April 2009 (UTC)

Table help

Hi, Could someone with the know-how fix the results tables on Pop Idol (UK series 1) and Pop Idol (UK series 2). I copied the format from the The X Factor (UK series 5) article but have had difficulty with alignment. Thanks. 03md 20:00, 30 April 2009 (UTC)

Table appears at bottom of page

Can someone make this table appear in the proper location: Wikipedia_talk:Lists#Lists.2FTables? Thanks! --Ronz (talk) 18:43, 1 May 2009 (UTC)

Fixed. --Ronz (talk) 21:54, 1 May 2009 (UTC)

Decimal point alignment issues

It seems to me that the decimal point alignment guidelines need to be updated. The current recommendation creates semantically broken html output.

For example, this wiki code: |align="right"| 432 || .1

Generates this output: <tr><td align="right">432</td><td>.1</td></tr>

This does not appear to be broken for a typical visitor. However, the html in fact contains two numbers, 432 and 0.1 - instead of one number, 432.1. This is a problem for search engines (like Google) and semantic engines, and also for text-only browsers and text readers.

I think that it would be a good idea to remove the decimal point alignment section until a better alternative is found.

--Kuteni (talk) 10:26, 16 May 2009 (UTC)

What is this color?

  Resolved

What is the name or HEX code for the background color of talkpages (like this page, or your user talkpage)? This is also the background color of help, and category pages. Debresser (talk) 10:50, 19 May 2009 (UTC)

Is there a choice "transparent"? Debresser (talk) 11:01, 19 May 2009 (UTC)

WP article background is #F8FCFF  . I figured this out a long time ago by looking at the page source, but have found it documented at Wikipedia:Colours. ---— Gadget850 (Ed) talk 11:33, 19 May 2009 (UTC)
Thanks again. I have also found the answer to my second question on the help page itself. I quote: "To make the table blend in with the background, use style="background:none" or style="background:transparent". (Warning: style="background:inherit", does not work with some browsers, including IE6!)" Debresser (talk) 13:43, 19 May 2009 (UTC)

Frankly I don't know why we don't use this by default in common.css:

table {
    background:transparent;
    }

White tables against a non-white background look really bad. — CharlotteWebb 02:08, 5 July 2009 (UTC)

Margin

Table in HTML
Suppose we have this table floating leftThe text at the right of the table...
...is brimming over the tablewhat parameter should we use to correct that ?
  • This text is running over the table.
  • It clearly run over now
  • What must be add in the table ? a "margin" ? How ?
  • Also in the HTML code, what should we add in the table tag ?
  • Pahapah (talk) 20:00, 24 May 2009 (UTC)

If you use class "wikitable" it does not overlap. — CharlotteWebb 01:54, 5 July 2009 (UTC)

Proposed enhancements to table sorting (rowspan/colspan support)

See en:Wikipedia:Village pump (proposals)#Proposed enhancements to table sorting (rowspan/colspan support). -- Tcncv (talk) 02:55, 27 May 2009 (UTC)

Swap Rows and Columns

Is there a tool for switching the rows and columns in a Table ("inverting" it) ?

Where are there tools for working with WP tables? -96.233.30.237 (talk) 19:28, 6 July 2009 (UTC)

I know of no purpose-specific tool for rearranging a table. It would be interesting to write though. I'll give it some thought.
The various Wikipedia tools are scattered on the toolserver at http://toolserver.org/ and in other places. A listing of projects is here, though the only table-related utilities are for converting HTML to wikimarkup and converting tab-delimited data to tables. —EncMstr (talk) 19:50, 6 July 2009 (UTC)

Yesterday I stumbled on an article with a big bad table [Comparison of S.M.A.R.T. tools]. It would be so much work to fix (swap the rows and columns) by hand that no one is going to do it -- the article will just hang around and fester... In general, working with WP tables is a nuisance, harder than it should be -- and not just for newbies. And often the results grow to be unusable -- there needs to be good ways to have big tables underlying the article, but view just the parts that interest you at the moment. I often read "comparison of" articles that contain info I am very interested in, but I give up because the info is spread over multiple tables in a way that makes it hard to digest (which program is no-cost, current, runs on Linux, and offers feature X?)

The csv2wp tool is not well supported. And there seems to be no complementary wp2csv table tool. That sounds pretty simple, and then simple tables could get converted to spreadsheets, where I guess it is easy (transpose or switch Excel row or column data) to do useful things. Hope you get inspired to work on this! -96.233.30.237 (talk) 11:28, 7 July 2009 (UTC)

Centering a wiki table

I've been trying this:
class="wikitable" align="center" style="text-align:center"
and it hasn't been working. How do I center a wikitable on the page? --Bluesoju (talk) 14:04, 8 July 2009 (UTC)

You should wrap the table into div tags. Ruslik_Zero 15:14, 8 July 2009 (UTC)
Wonderful, it worked like a charm. Thank you for your help sir. --Bluesoju (talk) 07:46, 9 July 2009 (UTC)

Weird results now, not sure what happened, in google chrome it doesn't center, in firefox only the table text at the top centers, in ie centers, an example:http://www.koreanwikiproject.com/wiki/index.php?title=Getting_started.

My basic code:

<div>
{| class="wikitable" align="center"
|-
|+Grammar Syntax
! Syntax !! Meaning !! Example !! Comment
|-
| A || Adjective (descriptive verb) || [[A + 구나]] || Adjective (descriptive verb) only pattern.
|-
| A/V || Adjective or Verb || [[A/V + 지만]] ||Adjective or verb may be used in this pattern.
|-
| N || Noun || [[N + (으)로]] || Noun only pattern
|-
| S || Sentence || ||
|-
| V || Verb (action verb) || [[V + (으)ㄹ 게요]] || Verb (action verb) only pattern.
|-
| +  || Attach the thing before and after the + symbol. || The adjective 춥다: 춥 + 지요 → 춥지요 || The verb stem is 춥 from 춥다(to be cold), gets joined with 지요.
|-
| (으) || If there is a [[받침]] add a 으. || [[A/V + (으)니까]] || -
|-
| (으)ㄹ || If there is a [[받침]] add 을 (으 being the optional grammar) otherwise add ㄹ as the [[받침]]. || [[A/V + (으)ㄹ지도 모르다]]
|If there is
|- -
| (으)ㄴ || If there is a [[받침]] add 은 (으 being the optional grammar) otherwise add ㄴ as the [[받침]]. || [[A + (으)ㄴ가요]] || -
|-
| (스)ㅂ || If there is a [[받침]] add 습 (스 being the optional grammar) otherwise add ㅂ as the [[받침]]. || [[A/V + (스)ㅂ니다]] || -
|-
| (이) || If there is a [[받침]] attach 이. Often used in conjunction with nouns. || [[N + (이)나]] || -
|-
| (  ) || The part inside the parenthesis is optional. || [[V + (으)ㄹ 수(가) 있다]] || The 가 is optional.
|-
| a/b || Either a or b || [[A/V + 아/어/여]] || Depending on the rule, you either pick 아, 어 or 여.
|}
</div>

Bluesoju (talk) 11:12, 2 August 2009 (UTC)


Try setting the margins to auto— this makes the left and right margins equal, which centers the table:

header 1 header 2 header 3
row 1, cell 1 row 1, cell 2 row 1, cell 3
row 2, cell 1 row 2, cell 2 row 2, cell 3

---— Gadget850 (Ed) talk 11:24, 2 August 2009 (UTC)

Works great! Thanks - --Bluesoju (talk) 09:47, 3 August 2009 (UTC)
OK— this is actually documented at Help:Table#Centering tables. ---— Gadget850 (Ed) talk 10:17, 3 August 2009 (UTC)

Alt text

Hello. Would whoever is maintaining tables please consider adding an "alt=" field so that editors may comply with WP:ALT? Thanks. -SusanLesch (talk) 03:25, 15 July 2009 (UTC)

WP:ALT does not apply. Tables are not images. They are basic page layout directives. They can contains images and/or text and/or other items (controls, formulae, etc.), but they can always be rendered. —EncMstr (talk) 05:25, 15 July 2009 (UTC)
OK if you say so. A table can contain an image which needs to have alt text but the image template doesn't work with alt inside table. -SusanLesch (talk) 05:39, 15 July 2009 (UTC)
Really? (What image template?)
 
Mount Hood wildflowers
text text
text text text text
Is this not behaving correctly? —EncMstr (talk) 05:50, 15 July 2009 (UTC)
Yes as far as it goes. I think (but don't know) that the alt field is visible only to screen readers. I found this problem in Northwestern Consolidated Milling Company but can imagine that many list articles (list of tallest buildings in such and such a city and so on) would also put images inside table. -SusanLesch (talk) 05:58, 15 July 2009 (UTC)
Oh for dumb! Sorry EncMstr. I made a typo " |alt=the Crown Roller mill in winter (contemporary photo)|". Putting alt inside the image link works just fine! -SusanLesch (talk) 07:00, 15 July 2009 (UTC)
This question came from a similar one about the gallery template. I jumped to the conclusion that there was a problem here in table. Again sorry! -SusanLesch (talk) 16:21, 15 July 2009 (UTC)

how to align whole column to the right? col-style

There is broadly explained the decimal alignning Help:Table#Decimal_point_alignment, but how to align whole column to the right? How to assign a style to a whole column? ...It is possible to put there such style rule to EVERY row of the table, but a) that is really annoying at log tables, and b) a source of mistakes beause of repeated "worthless typing". Any clue? Thanks. --Franta Oashi (talk) 01:50, 16 July 2009 (UTC)

The first idea I had was related to "col-group", but I doubt such is supported by all (enough) browsers.

Another solution I can imagine is to make such param to the wiki-col syntax for tables: {| |- | |}. That would need to enhance the internal WP interpreter to accept such new col-param. The result could be i.e. the style for every cell in the col on every row. ...we have machines to make repettive operations, let's get rid of the ugly WP page-coce! Or does such behaviour/syntax exist already?? --Franta Oashi (talk) 01:50, 16 July 2009 (UTC)

I don't think there is any way to do that without repetition for each row, just like coloring a column. —EncMstr (talk) 05:35, 16 July 2009 (UTC)
I was afraid so. Then, let the repetition is done automaticaly, by the server machine. --Franta Oashi (talk) 02:52, 17 July 2009 (UTC)

Tool to add a column

Is there are tool which will add a column into the middle of an existing wiki-markup table? Perhaps a third-party WYSIWYG editor, into which the markup is pasted? Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 20:00, 18 July 2009 (UTC)

Only way I know of it to copy the table to Excel or similar, edit it, then convert back to wikimarkup. ---— Gadget850 (Ed) talk 20:42, 18 July 2009 (UTC)
Thank you, that works for simple text content, but not if the table includes markup such as inline styles and links. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 22:01, 18 July 2009 (UTC)

Help on sorting numbers

Date Casualties References
1937, March 2 Oranges
1937, November 14 10 Oranges
1938, April 12 12 Oranges
1938, April 17 1 Orange
1938, May 17 1 Orange
1938, May 24 23 Oranges
1938, June 23 2 Oranges
1938, June 26 27 Oranges
1938, June 27 1 Orange
1938, July 5 17 Oranges

The sorting is wrong as 1, 10, 100, 2, 20, 200. How to sort the table as 1, 2, 10, 20, 100, 200. Kasaalan (talk) 12:30, 14 August 2009 (UTC)

The code that does the sorting autodetects the type of data in the column. Since the data includes text (23 Oranges), the entire column is treated and sorted as text. You can use {{sort}} to set a sortkey. You probably also want {{dts}} for the date sorting. See also Help:sorting. ---— Gadget850 (Ed) talk 12:47, 14 August 2009 (UTC)

Desynchronizing where rows in different columns end

I broke my user page. :( It looks perfect on my resolution, but on others' it stretches the right-column boxes so they end where each row on the left does. Figured this was as good a time as any for an education: How would I "free" each row to end based only on the size of its own contents, rather than based on where the longer of the two boxes in that row stretches to? Visually, in effect, I suppose I want two side-by-side, one-column tables that ideally end in the same place, but have unequally long rows. But with the current bells 'n' whistles. :\\ Example (C1R1 is column-1 row-1, etc.):

C               C
1               2
R               R1
1               -
-               C2
C               R2
1               -
R               C2
2               R3

-Silence (talk) 03:41, 18 August 2009 (UTC)

Header cell in row

An example of how to produce:

<tr><th></th><td></td></tr>

would be useful, please. Andy Mabbett (User:Pigsonthewing); Andy's talk; Andy's edits 20:32, 19 September 2009 (UTC)

Retrofit talk-page year headers/subpages

10-April-2009: I have added subheaders above as "Topics from 2007" (etc.) to emphasize the dates of topics in the talk-page. Older topics might still apply, but using the year headers helps to focus on more current issues as well. Afterward, I dated/named unsigned comments and moved entries (including "Entire cell...") into date order for 2009. -Wikid77 (talk) 16:45, 8 April 2009 (UTC)

Borderless table

Hello everyone, I was wondering if anyone could tell me (or show me) how to make a borderless table, not one with a white border but with no border at all, thanks. Supaman89 (talk) 23:12, 6 October 2009 (UTC)

Use style="border-style:none;".[1] Will not work with class="wikitable". ---— Gadget850 (Ed) talk 12:12, 27 October 2009 (UTC)

Text failing to make way for box

Does anyone know why, in the lead section of Wikipedia:List of guidelines, the text is failing to wrap around the side navigation box (at least, in IE6)? (I mean, part of the text is under the box.)--Kotniski (talk) 11:28, 27 October 2009 (UTC)

I happens with FireFox 3.5 as well. You can fix it with {{FixBunching}}. ---— Gadget850 (Ed) talk 12:04, 27 October 2009 (UTC)
That worked! Great, thanks!--Kotniski (talk) 13:12, 27 October 2009 (UTC)

images

This page has a lot of images that, quite frankly, don't need to be here. Take the blinds section. Why is this here? Sure it helps illustrate the invisible table, but it crushes any hope of a reasonable loading time. Nezzadar [SPEAK] 18:07, 2 November 2009 (UTC)

Alignment problem

How do I properly align the numbers in the second table (the small "Age/National Treasure" table) in List_of_National_Treasures_of_Japan_(paintings)#Statistics? They got disaligned by the references. bamse (talk) 23:33, 6 November 2009 (UTC)

Help me

I've made a mess of this table. How do i even out the the cullums under the Vehicle section? username 1 (talk) 22:51, 18 November 2009 (UTC)

Munitions
Bombs Missiles
Name Type Versions Name Type Versions
BLU-109 Penetration bomb AGM-65 Air-to-surface
BLU-116 Penetration bomb AGM-158 Air-to-surface cruise missile
CBU-87 Cluster bomb AIM-9 Short-range Air-to-air missile
CBU-89 Cluster bomb AIM-120 Medium-range Air-to-air missile
CBU-97 Cluster bomb
GBU-12 laser-guided bomb
GBU-24 laser-guided bomb
GBU-27 laser-guided bomb
GBU-28 laser-guided bomb
Weapons
Aircraft guns
Name Type Versions Ammunition Used by Picture
GAU-8 Avenger Seven-barrelled Gatling gun 30 mm A-10/OA-10 Thunderbolt II
 
M61 Six-barrelled Gatling gun 20 mm F-15 Eagle
F-16 Fighting Falcon
F-22 Raptor
 
GAU-16 12.7 mm UH-1 Iroquois
 
GAU-17 Six-barrelled Gatling gun 7.62 mm HH-60 Pave Hawk
UH-1 Iroquois
 
M240 7.62 mm UH-1 Iroquois
 
Small arms
M4 carbine 5.56 mm
 
M9 pistol 9 mm
 
Vehicles
Name Type Versions Quantity[1] Picture
Manned
Fixed-wing Aircraft
A-10/OA-10 Thunderbolt II Attack Aircraft /
Observation Aircraft
A-10A
A-10C
OA-10A
111
138
108
 
B-2 Spirit Strategic bomber B-2A 20 (1 is test aircraft)
 
B-52 Stratofortress Strategic bomber B-52H 85 [2]
 
B-1 Lancer Supersonic Strategic bomber B-1B 66 (2 are test aircraft) [3]
 
C-5 Galaxy Cargo Aircraft C-5A
C-5B
C-5C
C-5M
59
47
2
3
 
C-17 Globemaster III Cargo Aircraft C-17A 185
 
Learjet C-21 Cargo Aircraft C-21A 76
C-130 Hercules Cargo Aircraft C-130E
C-130H
C-130J
C-130J-30
171
283
48
5
 
E-3 Sentry Airborne Command and Control Aircraft E-3B
E-3C
22
10
 
EC-130 Commando Solo Electronic Warfare Aircraft EC-130E
EC-130H
EC-130J
4
14
6
 
F-15 Eagle Multirole Fighter F-15C
F-15D
F-15E
336
48
223
 
F-16 Fighting Falcon Multirole Fighter F-16C
F-16D
1,082
180
 
F-22 Raptor Stealth Air superiority fighter F-22A 137
 
HC-130 Hercules Search and Rescue Aircraft HC-130N
HC-130P
10
22
 
KC-10 Extender Tanker Aircraft KC-10A 59
File:KC-10 Extender (2151957820).jpg`
KC-135 Stratotanker Tanker Aircraft KC-135E
KC-135R
KC-135T
114
364
54
 
MC-130 Hercules Multi-mission Aircraft MC-130E
MC-130H
MC-130P
14
20
27
 
T-1 Jayhawk Trainer Aircraft T-1A 179
 
T-6 Texan II Trainer Aircraft T-6A 337
 
T-38 Talon Trainer Aircraft T-38A
T-38C
(A)T-38B
200
246
31
 
U-2 Dragon Lady Reconnaissance Aircraft U-2S 28
 
Rotary-wing Aircraft
UH-1 Iroquois Utility Helicopter UH-1N
UH-1V
62
2
 
HH-60 Pave Hawk Search and Rescue Helicopter HH-60G 101
 
Ground vehicles
R-11 Refueler Aircraft Refuel Vehicle
 
C300 Ground Refuel Vehicle
Unmanned
Aircraft
MQ-1 Predator Multi-mission aircraft 130[4]
 
Spacecraft
Atlas V EELV/Medium-heavy launch vehicle
 
Delta IV
 
Defense Meteorological Satellite Program Meteorology Surveillance
File:DMSP Block-5D3.jpg
Defense Support Program Reconnaissance
 
Global Positioning System Navigation and Timing 30[5]
 

Template in a table?

I'm trying to use Template:Nihongo inside a wiki-pipe table, but it seems to destroy the table. The code I want to add is {{nihongo|"[[Pink (Tokio song)|Pink]]"|ピンク|Pinku}}, and I tried using {{nihongo{{!}}"[[Pink (Tokio song)|Pink]]"{{!}}ピンク{{!}}Pinku}} but that doesn't help much. What should I do? Nevermind, problem solved. Eugeniu B +1 23:23, 29 November 2009 (UTC)

Table Help

Could some kind person take a look at this and give me some formatting tips so its not so gangly. Thanks. WVBluefield (talk) 17:16, 25 November 2009 (UTC)

Why do you think it looks gangly? —EncMstr (talk) 19:10, 25 November 2009 (UTC)
I would like to shrink it's size so it fits neatly into an article. WVBluefield (talk) 15:53, 30 November 2009 (UTC)

Nested table within Wikitable

I've created a table at User:Dream out loud/List of SEPTA City Transit Division routes and the second column featured a nested table in each cell. I created a template for the nested table at User:Dream out loud/table and it works well, except for the fact that there is too much padding in the cells. I've tried messing with all the style options and other parameters, but I think it has something to do with the presets for the wikitable class. Any suggestions? Thanks. –Dream out loud (talk) 01:10, 13 December 2009 (UTC)

Need Help

Hi. How to align the content of a cell while assigning the rowspan?
somethong like that:

{| class="wikitable"
|+ Caption
| rowspan="5"; align="right" | Cell1
.
.
.
|}

tnx. --Ghazy Kelay (talk) 17:20, 11 January 2010 (UTC)


You almost had it—just leave out the semicolon:
column 1 header column 2 header
row 1, col 1 row 1, col 2
row 2, col 2
row 3, col 2
row 4, col 2
row 5, col 2
EncMstr (talk) 20:35, 11 January 2010 (UTC)
OH! The semicolon MISTAKE... That was my last thought! Thanks a lot. --Ghazy Kelay (talk) 21:09, 11 January 2010 (UTC)

View only selected rows in table

I would like to set option in the table to view selected rows base on the value of one of the column. For example: One of the value in the column III is "A". Therefore, if I choose "A" (I don't know how) -> display only rows with value "A" in the column III. --WlaKom (talk) 00:18, 12 January 2010 (UTC)

If I understand correctly, you want the table to hide and/or unhide rows depending on something that is clicked in the table. Is that correct? I don't know if any way of doing that, except maybe to place a collapsible table in the table. I'll try to find an example. —EncMstr (talk) 06:19, 12 January 2010 (UTC)
Yes. But collapsible table will not be sortable. Instead clicking in the table, "insertbox" with default value aside may be better solution, or double title with choice to show "only with "A", or All. --WlaKom (talk) 09:18, 12 January 2010 (UTC)

Display firstname lastname but sort by lastname, firstname?

Is it possible to do that somehow with the automatic table? Шизомби (Sz) (talk) 17:28, 6 January 2010 (UTC)

View only selected/empty columns/rows in table

Hello! My problem is similar to the above. I would like empty columns (maybe even rows) to optionally hide in case they're empty. Is that possible? If not, maybe we could make a new template...? Thanks a lot for any advice! --Pet'usek [petrdothrubisatgmaildotcom] 14:58, 22 January 2010 (UTC)

Toolbar

I just restored the instructions If "Insert a table" is not on the toolbar—which may be the case on many MediaWiki wikis—follow these directions to add it. This may be skin dependent, and certainly for non-Mediawiki wikis which refer to this as a reference this simple sentence is highly valuable. —EncMstr (talk) 18:14, 10 February 2010 (UTC)

OK, we shouldn't have to cater for other MW wikis, but we could drop the 'which may be the case on many MediaWiki wikis' bit to avoid excess info and still have the info needed visible. ? --Lee∴V (talkcontribs) 18:22, 10 February 2010 (UTC)
Even on enwiki using monobook, the icon might be removed or changed—let alone all the other possible customizations a user or changes the developers might perform. I've used several other wikis which link to enwiki for technical documentation, so I don't think it's catering so much as a public service and a good example of open collaboration. I agree with your suggestion. —EncMstr (talk) 18:28, 10 February 2010 (UTC)
Have applied. I'm much for openess and will keep a better eye out for such compromises, I'm also going to have a look in future to make sure help pages have a link to the mediawiki version if there is one. One day I may even have a look at the MW help itself, but getting WP:help right is first priority. Maybe I'll have another perusal other at mediawiki to see what possibilities there are, --Lee∴V (talkcontribs) 19:07, 10 February 2010 (UTC)

Multiple tables aligned next to each other

Is there any real way in aligning these 3 different tables right next to each other ? Thanks a lot.

Medals by sport
Sport       Total
Gymnastics[6] 11 2 5 18
Weightlifting 8 1 0 9
Diving 7 1 3 11
Shooting 5 2 1 8
Table tennis 4 2 2 8
Badminton 3 2 3 8
Judo 3 0 1 4
Boxing 2 1 1 4
Swimming 1 3 2 6
Wrestling 1 2 0 3
Archery 1 1 1 3
Rowing 1 1 0 2
Fencing 1 1 0 2
Taekwondo 1 0 1 2
Sailing 1 0 1 2
Canoeing[7] 1 0 0 1
Volleyball[8] 0 1 2 3
Hockey 0 1 0 1
Athletics 0 0 2 2
Cycling[9] 0 0 1 1
Tennis 0 0 1 1
Synchronized Swimming 0 0 1 1
Total 51 21 28 100
Multiple medalists
Name Sport       Total
Zou Kai Gymnastics 3 0 0 3
Yang Wei Gymnastics 2 1 0 3
He Kexin Gymnastics 2 0 0 2
Chen Yibing Gymnastics 2 0 0 2
Li Xiaopeng Gymnastics 2 0 0 2
Xiao Qin Gymnastics 2 0 0 2
Guo Jingjing Diving 2 0 0 2
Chen Ruolin Diving 2 0 0 2
Zhang Yining Table tennis 2 0 0 2
Ma Lin Table tennis 2 0 0 2
Wang Nan Table tennis 1 1 0 2
Wang Hao Table tennis 1 1 0 2
Zhang Juanjuan Archery 1 1 0 2
Cheng Fei Gymnastics 1 0 2 3
Yang Yilin Gymnastics 1 0 2 3
Qin Kai Gymnastics 1 0 1 2
Wu Minxia Diving 1 0 1 2
Wang Xin Diving 1 0 1 2
Guo Yue Table tennis 1 0 1 2
Wang Liqin Table tennis 1 0 1 2
Yu Yang Badminton 1 0 1 2
Pang Jiaying Swimming 0 1 2 3
Medals by date
Day Date       Total
Day 1 7th 5 4 6 15
Day 2 8th 3 6 4 13
Day 3 9th 8 11 6 25
Day 4 10th
Day 5 11th
Day 6 12th
Day 7 13th
Day 8 14th
Day 9 15th
Day 10 16th
Day 11 17th
Total 16 21 16 53

Polylepsis (talk) 11:46, 30 January 2010 (UTC)

How about to what I just edited it to? (see sections 3.6 and 3.11 - "vertical alignment" and "nested tables" in the article page) --99.96.100.176 (talk) 03:06, 15 April 2010 (UTC)

Sorting numerics with references

Chart (2009–2010) Peak
position
Australian Singles Chart[10] 13[11]
Canadian Hot 100[12] 8[13]
Czech Airplay Chart[14] 59[15]
Dutch Top 40[16] 20[17]
Hungarian Singles Chart[18] 3[19]
Irish Singles Chart[20] 26[21]
New Zealand Singles Chart[22] 21[23]
Slovak Airplay Chart[24] 19[25]
Swedish Singles Chart[26] 33[27]
UK Singles Chart[28] 30[29]
U.S. Billboard Hot 100[30] 16[31]
U.S. Billboard Hot Dance Club Songs[32] 1[33]
Chart (2009–2010) Peak
position
Australian Singles Chart 13
Canadian Hot 100 8
Czech Airplay Chart 59
Dutch Top 40 20
Hungarian Singles Chart 3
Irish Singles Chart 26
New Zealand Singles Chart 21
Slovak Airplay Chart 19
Swedish Singles Chart 33
UK Singles Chart 30
U.S. Billboard Hot 100 16
U.S. Billboard Hot Dance Club Songs 1

Top table sort on peak position fails. 1 comes after 19 etc. Compare to second table, that works but there are no citations. Obviously in the WP:V world of wikipedia, citations for WP:RS are required, hence the issue. SunCreator (talk) 02:54, 14 February 2010 (UTC)

Here's one solution. Its wikitext is a bit more messy, but it works well:
Chart (2009–2010) Peak
position
Australian Singles Chart[34] 13[35]
Canadian Hot 100[36] 8[37]
Czech Airplay Chart[38] 59[39]
Dutch Top 40[40] 20[41]
Hungarian Singles Chart[42] 3[43]
Irish Singles Chart[44] 26[45]
New Zealand Singles Chart[46] 21[47]
Slovak Airplay Chart[48] 19[49]
Swedish Singles Chart[50] 33[51]
UK Singles Chart[52] 30[53]
U.S. Billboard Hot 100[54] 16[55]
U.S. Billboard Hot Dance Club Songs[56] 1[57]
EncMstr (talk) 04:21, 14 February 2010 (UTC)


Thank you EncMstr! SunCreator (talk) 17:50, 14 February 2010 (UTC)

A method to display the row number

This would be really helpful for "ranked" tables with multiple sort columns such as this: http://en.wikipedia.org/w/index.php?title=List_of_countries_by_infant_mortality_rate&oldid=352338881. I'd like to see the ranked number for each of the columns upon sorting, without having to manually count.

Unless someone implements this, it seems like we'd have to make an extra column of rank numbers for each of the sortable parameter columns. --99.96.100.176 (talk) 02:36, 15 April 2010 (UTC)

Leading and trailing whitespace in column headings?

In this format where the column headings are concatenated, the bar and exclamation point enclose a text string that may include leading and trailing whitespace.

{| class="wikitable" style="width:98%;"
|-
! width="5%"|# !! width="26%"| Title !! width="22%"| Topic !! width="23%"| Equipment !!...

In this format where the column headings are on separate lines, there appears to be no demarcation for trailing whitespace. Or if the end of line is the demarcation, then trailing whitespace is invisible - not a good thing if leading and trailing whitespace affect header centering and column width.

{| class="wikitable" style="width:98%;"
|-
! width="5%"|#
! width="26%"| Title 
! width="22%"| Topic 
! width="23%"| Equipment 
...

So, is leading and trailing whitespace in column header strings significant? Or is it trimmed? Dmforcier (talk) 17:33, 19 April 2010 (UTC)

See Space_(punctuation)#Space_characters_in_markup_languages. Basically, HTML collapses multiple spaces into one space. If you need hard spaces for some reason, use  . When using the wikitable class, table headings are centered by default. ---— Gadget850 (Ed) talk 18:08, 19 April 2010 (UTC)
Thanks, but that doesn't answer my question. Does ' Title' center identically to ' Title ' and 'Title '? Dmforcier (talk) 18:55, 19 April 2010 (UTC)
Yes:
Title
Title
Title
---— Gadget850 (Ed) talk 19:53, 19 April 2010 (UTC)

"Help"?

This honestly has to be the least helpful "Help" page in WP! Looking up "color" for example doesn't explain the difference between "color" and "background" and claims that there are "Two ways of specifying color" but doesn't really specify what they are but rather leaves it to readers to realise that two methods really are used in the markup shown. Worse, Help:Table#Positioning tells us the postioning is possible but doesn't explain how beyond pointing to a discussion on WikiMedia and another horribly convoluted section that I can never quite get my head around. Is there any chance of creating a summary table explaining all the markup at a glance? I would try but I really am lost when I try to read this page. Thanks --Jubileeclipman 23:38, 24 April 2010 (UTC)

Sorting

Can you make only certain columns sortable? I tried the following:

|-
! class="sortable"| Date
! class="sortable"| Artist(s)
! Venue
|-

but it didn't seem to work. Thanks! --SteelersFanUK06 HereWeGo2010! 17:01, 21 June 2010 (UTC)

No. You make the table sortable, then columns unsortable. See Help:Sorting#Making a column unsortable. ---— Gadget850 (Ed) talk 19:17, 21 June 2010 (UTC)
Oh. Okay. Brilliant. In that case, maybe you can help me with something else as well. I'm trying to display a table, here, only the table was gigantic when shown in one list. Splitting it into two is how the page is currently, but I think theremust be a better way of doing it. Any ideas, table experts? --SteelersFanUK06 HereWeGo2010! 20:04, 21 June 2010 (UTC)
Oops, wait, just found a similar question asked above. Got it! --SteelersFanUK06 HereWeGo2010! 22:52, 21 June 2010 (UTC)

Unnatural History (TV series)

Hi

Can someone try and fix the table on Unnatural History (TV series)

I have made it much better but cannot fix the border

thanks Chaosdruid (talk) 22:27, 22 June 2010 (UTC)

What do you mean? It looks okay to me. Svick (talk) 22:45, 22 June 2010 (UTC)
There is no border along the top or down the right side of the table.Chaosdruid (talk) 22:52, 22 June 2010 (UTC)
I see a border in IE, Firefox, Opera and Chrome in the version [2] at the time of your post. Try to bypass your cache. I have added the color in Linecolor to the header row as is often done. PrimeHunter (talk) 23:41, 22 June 2010 (UTC)

Conditional Table Row

Good day, all. I am creating an infobox template on an external wiki what will conditionally display rows depending on parameters passed. The rows in question are defined as such:

{{ #if: {{{property2|}}}|{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property2}}}}}

I have 11 properties just like that, and the table (when completely filled) would have 2 columns and 11 rows (although there is code to add "Properties" in the first column as a collective row header).

My question is this, everything works right, except that the table is always sized as if all of the rows are created. After turning border="1" to view the cells, it turns out the last cell is larger than all the others and makes up the balance of the space of the table. If there are 11 properties, the table is X pixels tall and all rows are evenly sized. If there are 4 properties, the table is still x pixels tall, and three rows are evenly sized, and the last takes up the remaining space.

I have not set a hard coded height for the table, and none of the rows have a height spec. Any help would be appreciated.

The template in question can be seen as a whole here. Tigey (talk) 23:31, 22 June 2010 (UTC)

It seems right, only I don't see a row separator. Include that within the
{{#if: ...}} 
body and it won't generate blank rows, thus hiding empty entries. —EncMstr (talk) 02:19, 23 June 2010 (UTC)
Row separator is here:
{{!}}- valign="top"
using the ! template. It is not creating blank rows though. It is just sizing the last row really large. After measuring the resulting infoboxes, I found that they are not all the same size. They are however sized according to a multiple of the row-height.Tigey (talk) 03:00, 23 June 2010 (UTC)
If you looked at the resulting HTML, you would see that lots of <p> tags are generated inside the table. That's because you have an unconditional newlines between {{#if}}s, so you have to make it conditional. Unfortunately, newline right after the start of parameter is ignored, but you can use <nowiki /> to fix that:
{| border="1" style="width: 25em; text-align: left; font-size: 95%; border: 1px solid #aaaaaa; background-color: #CCD0FF;color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right;"
|+ style="font-size: larger;" | '''{{{item_name}}}'''
|-
| colspan="2" style="text-align:center;" | {{#if: {{{item_image|}}}|[[Image:{{{item_image}}}|300px| ]]<br />}}<i>{{{caption|}}}</i>
{{ #if: {{{description|}}}|<nowiki/>
{{!}}- valign="top"
! Description:
{{!}} align="center" {{!}} {{{description}}}}}{{ #if: {{{property1|}}}|<nowiki/>
{{!}}- valign="top"
! Properties:
{{!}} align="center" {{!}} {{{property1}}}}}{{ #if: {{{property2|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property2}}}}}{{ #if: {{{property3|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property3}}}}}{{ #if: {{{property4|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property4}}}}}{{ #if: {{{property5|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property5}}}}}{{ #if: {{{property6|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property6}}}}}{{ #if: {{{property7|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property7}}}}}{{ #if: {{{property8|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property8}}}}}{{ #if: {{{property9|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property9}}}}}{{ #if: {{{property10|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property10}}}}}{{ #if: {{{property11|}}}|<nowiki/>
{{!}}- valign="top"
!
{{!}} align="center" {{!}} {{{property11}}}}}
|}
Also, I would make the image row conditional too. Svick (talk) 10:13, 23 June 2010 (UTC)
Thank you! Worked like a charm. I don't think I would have ever thought of that.Tigey (talk) 16:12, 23 June 2010 (UTC)
  1. ^ Aviation Week & Space Technology 2009, 26 JAN 2009 240. Web.28 Aug 2009. <http://www.aviationweek.com/aw/sourcebook/content.jsp?channelName=pro&story=xml/sourcebook_xml/2009/01/26/AW_01_26_2009_p0240-112924-158.xml&headline=World%20Military%20Aircraft%20Inventory%20-%20United+States>.
  2. ^ http://www.af.mil/information/factsheets/factsheet.asp?fsID=83
  3. ^ http://www.af.mil/information/factsheets/factsheet.asp?fsID=81
  4. ^ http://www.af.mil/information/factsheets/factsheet.asp?fsID=122
  5. ^ GPS Wing Reaches GPS III IBR Milestone in InsideGNSS November 10, 2008
  6. ^ including artistic, rhythmic and trampoline
  7. ^ including canoeing and kayaking, flatwater and slalom
  8. ^ including indoor and beach
  9. ^ including road cycling, track cycling, mountain biking and BMX
  10. ^ noref
  11. ^ noref
  12. ^ noref
  13. ^ noref
  14. ^ noref
  15. ^ noref
  16. ^ noref
  17. ^ noref
  18. ^ noref
  19. ^ noref
  20. ^ noref
  21. ^ noref
  22. ^ noref
  23. ^ noref
  24. ^ noref
  25. ^ noref
  26. ^ noref
  27. ^ noref
  28. ^ noref
  29. ^ noref
  30. ^ noref
  31. ^ noref
  32. ^ noref
  33. ^ noref
  34. ^ noref
  35. ^ noref
  36. ^ noref
  37. ^ noref
  38. ^ noref
  39. ^ noref
  40. ^ noref
  41. ^ noref
  42. ^ noref
  43. ^ noref
  44. ^ noref
  45. ^ noref
  46. ^ noref
  47. ^ noref
  48. ^ noref
  49. ^ noref
  50. ^ noref
  51. ^ noref
  52. ^ noref
  53. ^ noref
  54. ^ noref
  55. ^ noref
  56. ^ noref
  57. ^ noref