FANDOM


This Forum has been archived

Visit the new Forums
Forums: Index Help desk 2 columns for wikitable?
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 4163 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

I'm using a wikitable and I'd like to have two columns in one single table data cell. I tried using {{col-begin}} templates and it didn't seem to work. Or maybe have 1 column header have 2 subcolumns. I prefer the former, though if possible (just an indidual cell) [1] w3stfa11 05:14, 16 June 2008 (UTC)

An example of the former.

----a----bbbbb--     // column headers
|   a  | bbbbb |
|   a  | b | b |
|   a  | bbbbb |
________________


An example of the latter.

----a----bbbbb--
|   a  | b | b |
|   a  | b | b |
________________
Game Released NPD (month) Media Create (week ending) Chart-Track (week ending) Totals
Mario Kart Wii April 2008 Apr: 1120K
May: 787.4K
1.8m (U.S.)
Boom Blox May 2008 May: 60K
W1: 19
W2: 23
W3: 21
W4: 29

I copied over some style attribute from Video Games Sales Common.css and thoses need not to be included. — TulipVorlax 16:35, 16 June 2008 (UTC)

Thanks that seems to work. I had to copy the style attributes for it to work like I wanted it to (with little margins). [2] vs [3]. Is there a way I can make a style class so I can just type class="col2" and it'll apply all the attributes? Thanks for your help. w3stfa11 00:55, 17 June 2008 (UTC)
Made a minor edit to it. Like i said, you didn't need all of the style attribute if adding the proper class attribute. But, if you are sysop over there, you can create a new CSS rule like this :
table.InsideTable {
    width:75%;
    margin: 0px auto 0px auto;
    background: #f9f9f9;
    border: 1px #aaa solid;
    border-collapse: collapse;
}

And use it on all tables inside another one that need this formatting. — TulipVorlax 02:05, 17 June 2008 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.