Help talk:Tables

From MediaWiki.org

Jump to: navigation, search

Let's keep it simple at the top and add tricks in extra sections down the page. Cheers :-) --Rogerhc 07:07, 4 September 2006 (UTC)

Contents

[edit] Page layout

The page is laid out as follows:

  • Under each heading is a 2 column parent table with the example table nested into its left column and the example's wiki markup in pre tags in the right column.
  • The parent table is width="100%" and the two columns containing the nested tables are each width="50%". Pre tags containing long lines in the right column override its width="50%" attribute in most browsers which is good flexible browser behavior.
  • None of the page's sectional headings, H1, H2, H3, etc. are within tables, except the one in the example of how to do that. This avoids the to some confusing problem that when one previews an edit section within a parent table the parent table previews as broken; broken because the part of it above the edit section previewed is outside of and thus not parsed in the section previewed.

This will work well in most browsers I think.

Let us know if the layout breaks anything in your browser and which browser and version that is.

--Rogerhc 17:44, 4 September 2006 (UTC)

[edit] Headings in tables

Of course, you can use headings within tables. Your above note on "MediaWiki not supporting this" is wrong. --:Bdk: 11:11, 4 September 2006 (UTC)

Thank you. I have now added a section on Tables with H1, H2, H3 etc. headings. :-) Rogerhc 04:45, 5 September 2006 (UTC)

[edit] Tables in Excel (/Calc) converted to Wiki Markup

Is there any software available to convert an "Microsoft Excel" or "Open-Office Calc" table into a MediaWiki markup text document?

Would this be something people would consider usefull, as if it doesn't already exist, and there is a demand, I could a quick, basic one, as I use quite a few tables in my wiki.--Barryred

Yes! This would be absolutely helpful! --Nino Gonzales 04:10, 26 January 2007 (UTC)
See m:User talk:DBP.--Patrick 08:57, 26 January 2007 (UTC)

I've not tried this as I'm not a Python man but it might help. http://just-tech.blogspot.com/2007/01/python-html-tables-to-mediawiki.html --Dopple 09:27, 18 October 2007 (UTC)

On internet, several converters exists, one is excel2wiki.net

[edit] Cellpadding doesn't work

Old discussion deleted since this issue was fixed

...but thanks to Splarka for figuring out where the problem was in the CSS and Bdk for fixing it. -- Harry Wood 12:10, 4 January 2008 (UTC)


[edit] CSS style background-image not working inside cell style

Inside a cell the style parameter seems not to accept the parenthesis in background-image:url(/path/to/image.png);. See sample code:

{| border="1" 
| style="background-image:url(head.jpg); width:300px;" | fooo...
| style="width:100px;" align="right" | working style
|}

Here is the table:

fooo... working style

I tried using a template (like the {{!}}) and tried using ( and ). Do I see/do something wrong? How could I solve this? Didn't find anything in the docs or discussions yet...

- 80.254.136.33 - 11:19, 14 February 2008

Yeah most CSS within the style attribute should work ok, but I think any mention of 'url' is forbidden. So you can't use background images.
I could be wrong about that, but style attribute checking happens in includes/Sanitizer.php in the checkCSS function, and the comments there mention that urls are forbidden.
Probably the reason is to prevent certain kinds of minor security issues, people trying malicious CSS tricks. There is a setting Manual:$wgAllowExternalImages which malicious users might try to devise a workaround for, using style urls like this.
-- Harry Wood 14:28, 14 February 2008 (UTC)

[edit] FWIW, I think the previous formatting was easier to read

This is better: http://www.mediawiki.org/w/index.php?title=Help:Tables&oldid=234654

The <pre> foo </pre> content inside of a bordered table is redundant...why use a box in a box?

Why not use foo (via <tt> foo </tt>) instead?

Applicationswhisperer 18:45, 17 February 2009 (UTC)

I just tried to make it a little more consistent with other help pages, such as Help:Images and Help:Formatting. --Aotake 22:00, 17 February 2009 (UTC)

[edit] Rowspan

Mention rowspan. People will be wondering if it is implemented or not. Best to not leave them guessing. Jidanni 04:15, 26 April 2009 (UTC)

[edit] Table Footer?

I noticed that ! denotes a table header, but there doesn't seem to be a tag/indicator for a table footer

There isn't one. 'Bang' (!) corresponds to HTML's <th> (table header) tag. Pipe (|) corresponds to HTML's <td> (table data) tag. HTML does not have a 'table footer' tag. - Turing 07:26, 3 September 2009 (UTC)

[edit] HTML 5

See also W:MediaWiki_talk:Common.css#Wikitable borders disappear in email, blogs, disks, mobile devices. Jidanni 18:42, 19 August 2009 (UTC)

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

Answer:

{| border="0" 
|colspan="2" bgcolor="blue"|explicit
|-
|bgcolor="red"|borderless
|bgcolor="green"|table
|}

Here is the table:

explicit
borderless table

or

{|
|colspan="2" bgcolor="blue"|implicit
|-
|bgcolor="red"|borderless
|bgcolor="green"|table
|}

Here is the table:

implicit
borderless table

[edit] Can not add table to quest dialog

I can not add table to quest dialog

|conversationyou2=These figures have a long, long history, starting when, one day, the errant god Agias visited the world of Faeo. He was stunned by the change between day and night, which for the Faean natives was nothing out-of-the-ordinary. Over many days, Agias fell in love with the warm, tender dawn, when Mirrow would rise over the land, lighting it up with the first rays of the day, flooding its surfaces with golden light, and the defiantly purple sunset, setting fire to the sky with a multitude of colour, before soaking away completely into the sky, swallowed by the night. The extraordinary beauty of this event, an astounding mystery for Agias, engendered in his soul a desire to make his own contribution to the process, to perfect it.


And so the errant god decided to create across the expanse of this amazing world creatures that would sing sweet, caressing songs to greet the dawn of the morning and the evening sunset. Thus appeared the youms.


Convinced that he had done a truly wonderful deed by adding the joy of beautiful music to the joy of the world's visual beauty, Agias continued his path across the world, leaving the youms behind. Every morning, they sang an enchanting song to greet the coming of Mirrow and every evening they bade farewell to the star with a solemn, melancholic melody. It was, oh, so beautiful! It seemed like it would last forever, but the fates decided otherwise.


One day the youms came to the rapt attention of a highly ambitious, glory-hunting mage, Kroumtee, who was fascinated by the miraculous little creatures. Kroumtee came to understand that the youms spent a large part of their time asleep, coming to life only with the approaching dawn and sunset, at which point they would join together in a beautiful musical chorus. Kroumtee also noticed that the singing creatures did not live as a chaotic people, but were divided into various, organised groups, each one made up of sixteen youms. The most fascinating thing, though, was that each of these youms let out their own unique sound. Sixteen sounds would merge into a stunning melody, which could not be extracted from any known instrument. With the approaching dawn or sunset, the wonderful melody of the different groups seamlessly intertwined into a majestic, exquisite piece of music, which forced you to go through the full gamut of feeling, from exultation to depression, from love to hatred.


It was in that moment that Kroumtee literally lost his mind, overwhelmed with changing emotions. He cried like a child and fell to the grass, weak from his own inability to comprehend the great and the beautiful that the youms’ songs brought to him. When the music fell silent, Kroumtee racked his brains to try and gain some kind of understanding of the events. He was a powerful mage and it became a matter of honour and necessity for him to unravel the mysteries of the phenomenon. But all his efforts were in vain.


Then, one day, bitter and ruined, the mage took the decision to subjugate the miracle to his will, to make it his own, and he placed the souls of the defenceless youms into chess pieces.


{|

|{{ItemLink|link=Eldorill King}}

|{{ItemLink|link=Dugrkharg Ivory Queen}}

|{{ItemLink|link=Rosewood Rook}}

|{{ItemLink|link=Malachite Bishop}}

|{{ItemLink|link=Silver Knight}}

|{{ItemLink|link=Jasper Pawn}}

|}


The mage did this not only because chess was his favourite game, but because chess pieces were an ideal way to retain the unique groupings of the youms and preserve their relation to one another – there are sixteen pieces to a side in a chess set, you see. Afterwards, Kroumtee created a magic barrier around each of the figures and sent the complete set home, in the hope of continuing his research and finding out the truth. Well, you can imagine his surprise and disappointment when he realised that the imprisoned youms would not sing, but only whisper indecipherable little sounds. The furious mage thought that the melodious creatures were playing an evil joke on him and might even punish him with some curse. He decided to rid himself of them to the farthest reaches of the world.


Result with:

These figures have a long, long history, starting when, one day, the errant god Agias visited the world of Faeo. He was stunned by the change between day and night, which for the Faean natives was nothing out-of-the-ordinary. Over many days, Agias fell in love with the warm, tender dawn, when Mirrow would rise over the land, lighting it up with the first rays of the day, flooding its surfaces with golden light, and the defiantly purple sunset, setting fire to the sky with a multitude of colour, before soaking away completely into the sky, swallowed by the night. The extraordinary beauty of this event, an astounding mystery for Agias, engendered in his soul a desire to make his own contribution to the process, to perfect it.

And so the errant god decided to create across the expanse of this amazing world creatures that would sing sweet, caressing songs to greet the dawn of the morning and the evening sunset. Thus appeared the youms.

Convinced that he had done a truly wonderful deed by adding the joy of beautiful music to the joy of the world's visual beauty, Agias continued his path across the world, leaving the youms behind. Every morning, they sang an enchanting song to greet the coming of Mirrow and every evening they bade farewell to the star with a solemn, melancholic melody. It was, oh, so beautiful! It seemed like it would last forever, but the fates decided otherwise.

One day the youms came to the rapt attention of a highly ambitious, glory-hunting mage, Kroumtee, who was fascinated by the miraculous little creatures. Kroumtee came to understand that the youms spent a large part of their time asleep, coming to life only with the approaching dawn and sunset, at which point they would join together in a beautiful musical chorus. Kroumtee also noticed that the singing creatures did not live as a chaotic people, but were divided into various, organised groups, each one made up of sixteen youms. The most fascinating thing, though, was that each of these youms let out their own unique sound. Sixteen sounds would merge into a stunning melody, which could not be extracted from any known instrument. With the approaching dawn or sunset, the wonderful melody of the different groups seamlessly intertwined into a majestic, exquisite piece of music, which forced you to go through the full gamut of feeling, from exultation to depression, from love to hatred.

It was in that moment that Kroumtee literally lost his mind, overwhelmed with changing emotions. He cried like a child and fell to the grass, weak from his own inability to comprehend the great and the beautiful that the youms’ songs brought to him. When the music fell silent, Kroumtee racked his brains to try and gain some kind of understanding of the events. He was a powerful mage and it became a matter of honour and necessity for him to unravel the mysteries of the phenomenon. But all his efforts were in vain.

Then, one day, bitter and ruined, the mage took the decision to subjugate the miracle to his will, to make it his own, and he placed the souls of the defenceless youms into chess pieces.

{