Page 1 of 1

Wiki Table Formatting

Posted: Tue Sep 11, 2012 12:58 pm
by druidcent
I'm sure there are people here who know much more about wiki formatting than I do (even after reading the wiki :P)

I've gone through the wiki help on table formatting, and I'm still getting stuck on how to display the info that I want correctly.

Here is the example that I've been referencing from the Wikipeida page: Table Format

What I'm trying to do is:
Column A  |  Column B   | Column C
----------------------------------------
           |                  |   Data 1
Header1    |  Info1        |   Data 2
           |                  |   Data 3
----------------------------------------
Header2     |  Info2       |  Data 4
----------------------------------------                                     
           |                 |  Data 5
Header 3   |  Info 3        | Data 6


etc..

I've been playing around with rowspan, but I can't seem to get Column B to act correctly.. Either it becomes part of Column A, Column C, or creates a new line in Column B so the data doesn't line up correctly.. Any suggestions on how the markup should look would be greatly appreciated.
Thanks!

Edit: ASCII art fail... put it into a code block to be more readable.

Re: Wiki Table Formatting

Posted: Tue Sep 11, 2012 1:15 pm
by steelcity_ballin
COLSPAN refers to how many columns you want your single cell to span. If you have a 3 x 3 table and in row 2 you have a cell and add COLSPAN=3 to it, it will be a 1 cell 1 row column, while the row above it will maintain it's 3 cells. Rowspan works the same way but on the vertical. You're telling it how many ROWS or COLUMNS you want the cell you apply property this to, to span. It works the same way in HTML so perhaps a tutorial there would help you. I'm sure there are tons of them with appropriate visuals that could help.

Re: Wiki Table Formatting

Posted: Tue Sep 11, 2012 1:26 pm
by druidcent
Right..

Basically I want the first two columns in the row to span multiple rows on the last column

This is a one time thing, so I don't mind hand editing the table, but my problem is I can't seem to get rowspan to work on 2 cells at the same time..

Re: Wiki Table Formatting

Posted: Tue Sep 11, 2012 1:42 pm
by steelcity_ballin
I think you're getting your rows/columns confused, but lets assume a 3x3 again. It'd look something like this:

   <table border="1">
      <tr> <td>1</td> <td>2</td> <td>3</td> </tr>
      <tr> <td>1</td> <td>2</td> <td>3</td> </tr>
      <tr> <td>1</td> <td rowspan="2">2</td> </tr>
   </table>


So basically, this would create a 3x3 table where in the last row, the middle cell spans two cells. If you paste that code into an html document you can view it.

edit: I reviewed your new code block, lemme whip something up.

Re: Wiki Table Formatting

Posted: Tue Sep 11, 2012 1:50 pm
by steelcity_ballin
Pardon the lack of color, is this what you want?

http://i.imgur.com/cjZJ3.png

Re: Wiki Table Formatting

Posted: Tue Sep 11, 2012 1:54 pm
by druidcent
Yup.. that's exactly right..

Re: Wiki Table Formatting

Posted: Tue Sep 11, 2012 1:57 pm
by steelcity_ballin
druidcent wrote:
Yup.. that's exactly right..

<table>
        <tr>
            <td colspan="2" rowspan="3">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td >
                &nbsp;</td>
            <td >
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td colspan="2" rowspan="2">
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
        </tr>
    </table>


Keep in mind the formatting above sucks, so you might have to play witht he width's of cells and what not. I didn't include a stylesheet - but that's the basic structure. Should translate to wiki I imagine.

Re: Wiki Table Formatting

Posted: Tue Sep 11, 2012 2:04 pm
by druidcent
Thanks, let me give it a shot...