Personal computing discussed

Moderators: renee, Dposcorp

 
druidcent
Minister of Gerbil Affairs
Topic Author
Posts: 2510
Joined: Wed Aug 07, 2002 7:55 pm
Location: Earth, Sol, Milky Way
Contact:

Wiki Table Formatting

Tue Sep 11, 2012 12:58 pm

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.
Last edited by druidcent on Tue Sep 11, 2012 1:24 pm, edited 2 times in total.
 
steelcity_ballin
Gerbilus Supremus
Posts: 12072
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Tue Sep 11, 2012 1:15 pm

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.
 
druidcent
Minister of Gerbil Affairs
Topic Author
Posts: 2510
Joined: Wed Aug 07, 2002 7:55 pm
Location: Earth, Sol, Milky Way
Contact:

Re: Wiki Table Formatting

Tue Sep 11, 2012 1:26 pm

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..
 
steelcity_ballin
Gerbilus Supremus
Posts: 12072
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Tue Sep 11, 2012 1:42 pm

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.
 
steelcity_ballin
Gerbilus Supremus
Posts: 12072
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Tue Sep 11, 2012 1:50 pm

Pardon the lack of color, is this what you want?

http://i.imgur.com/cjZJ3.png
 
druidcent
Minister of Gerbil Affairs
Topic Author
Posts: 2510
Joined: Wed Aug 07, 2002 7:55 pm
Location: Earth, Sol, Milky Way
Contact:

Re: Wiki Table Formatting

Tue Sep 11, 2012 1:54 pm

Yup.. that's exactly right..
 
steelcity_ballin
Gerbilus Supremus
Posts: 12072
Joined: Mon May 26, 2003 5:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Tue Sep 11, 2012 1:57 pm

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.
 
druidcent
Minister of Gerbil Affairs
Topic Author
Posts: 2510
Joined: Wed Aug 07, 2002 7:55 pm
Location: Earth, Sol, Milky Way
Contact:

Re: Wiki Table Formatting

Tue Sep 11, 2012 2:04 pm

Thanks, let me give it a shot...

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On