Project

General

Profile

Wiki/Textile: Column width of a table

Added by Robert Schneider over 9 years ago

Is it possible to set the column width of tables? I cannot figure it out...

Cheers,
Robert


Replies (7)

RE: Wiki/Textile: Column width of a table - Added by Jean-Baptiste Barth over 9 years ago

Yes that way:

|{width:200px}. long column width | auto column width |

If you need something more "systematic/automatic", you may want to modify your CSS globally.

RE: Wiki/Textile: Column width of a table - Added by Robert Schneider over 9 years ago

I see. The width has to be defined in one row (header would be the best row). For multiple definitions like

|{width:100px}. short column width | auto column width |
|{width:200px}. medium column width | auto column width |
|{width:300px}. long column width | auto column width |

textile seems to use the greatest value. The above results in this table:

short column width auto column width
medium column width auto column width
long column width auto column width

Thanks.

RE: Wiki/Textile: Column width of a table - Added by Jean-Baptiste Barth over 9 years ago

It's not textile, it's HTML / your browser : if you have standard columns with no "colspan"s they all have the same width vertically. As far as I know you cannot do complicated things like colspan (= table cells merge) in textile.

RE: Wiki/Textile: Column width of a table - Added by Anonymous over 9 years ago

Colspan can be done:

|/2. Table |_.with two columns|
|{width:200px}. rows|
|\2={width:800px}. connected|
|/3. spans 3 rows | a |
| b |
| c |

goes to:

Table with two columns
rows
connected
spans 3 rows a
b
c

RE: Wiki/Textile: Column width of a table - Added by Robert Schneider over 9 years ago

Jean-Baptiste Barth wrote:

It's not textile, it's HTML / your browser

{XXXXXX}. contains styling information, i.e. CSS.
Now I found detailed information here: http://redcloth.org/hobix.com/textile/

Clemens Kuprian: thanks, that was the thing that I already knew about tables.

RE: Wiki/Textile: Column width of a table - Added by Jean-Baptiste Barth over 9 years ago

Thanks Clemens.

Robert: I guess you didn't understand me. I was saying that the fact the following html code doesn't display different column widths is not textile "fault":

<table>
  <tr>
    <td style="width:100px">foo</td>
  </tr>
  <tr>
    <td style="width:200px">bar</td>
  </tr>
</table>

Just try it and you'll see the two columns will be displayed with a width of 200px.

Hence, what you're trying to achieve is not so simple.

RE: Wiki/Textile: Column width of a table - Added by Robert Schneider over 9 years ago

No, no, I've got you! And I didn't want to blame textile, nor html. I even didn't want to achieve more than to specify a single column width. I just wanted to annotate that if one uses more than a single definition (which does not make so much sense, I think) the largest width would be used. But this is the default behaviour of the browser, nothing special here.

Thanks anyway.
Robert

    (1-7/7)