Wiki Table Formatting

The place for all kinds of software for all kinds of operating systems.

Moderator: Dposcorp

Wiki Table Formatting

Postposted on Tue Sep 11, 2012 11:58 am

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:
Code: Select all
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 12:24 pm, edited 2 times in total.
druidcent
Minister of Gerbil Affairs
 
Posts: 2060
Joined: Wed Aug 07, 2002 6:55 pm
Location: Earth, Sol, Milky Way

Re: Wiki Table Formatting

Postposted on Tue Sep 11, 2012 12: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.
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11884
Joined: Mon May 26, 2003 4:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Postposted on Tue Sep 11, 2012 12: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..
druidcent
Minister of Gerbil Affairs
 
Posts: 2060
Joined: Wed Aug 07, 2002 6:55 pm
Location: Earth, Sol, Milky Way

Re: Wiki Table Formatting

Postposted on Tue Sep 11, 2012 12:42 pm

I think you're getting your rows/columns confused, but lets assume a 3x3 again. It'd look something like this:

Code: Select all
   <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.
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11884
Joined: Mon May 26, 2003 4:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Postposted on Tue Sep 11, 2012 12:50 pm

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

http://i.imgur.com/cjZJ3.png
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11884
Joined: Mon May 26, 2003 4:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Postposted on Tue Sep 11, 2012 12:54 pm

Yup.. that's exactly right..
druidcent
Minister of Gerbil Affairs
 
Posts: 2060
Joined: Wed Aug 07, 2002 6:55 pm
Location: Earth, Sol, Milky Way

Re: Wiki Table Formatting

Postposted on Tue Sep 11, 2012 12:57 pm

druidcent wrote:Yup.. that's exactly right..

Code: Select all
<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.
Corsair 600T | ASUS P8P67 PRO | Intel 2500k @ 4.4Ghz | EVGA 560 TI | G.SKILL Ripjaws Series 8GB | Corsair HX650 650W
steelcity_ballin
Gerbilus Supremus
Silver subscriber
 
 
Posts: 11884
Joined: Mon May 26, 2003 4:55 am
Location: Pittsburgh PA

Re: Wiki Table Formatting

Postposted on Tue Sep 11, 2012 1:04 pm

Thanks, let me give it a shot...
druidcent
Minister of Gerbil Affairs
 
Posts: 2060
Joined: Wed Aug 07, 2002 6:55 pm
Location: Earth, Sol, Milky Way


Return to General Software

Who is online

Users browsing this forum: No registered users and 1 guest