Forum:How to have two columns in an Infobox?

So far here is what I finished. http://robotrising.wikia.com/wiki/Phoenix_Sys._Class:_Gladius

I want to atleast have it halved so that the space on the right won't get wasted. Trirarchie 22:55, September 21, 2012 (UTC)
 * What does that have to do with having two columns? That template already has two columns.--PedroM (talk) 10:11, September 22, 2012 (UTC)
 * Sorry make that four columns. I don't want to waste space on the right as there is a very big space on the right left. Trirarchie 17:00, September 22, 2012 (UTC)
 * The template used on that page uses in its code another underlying template. That you have to edit. Alas, it uses HTML syntax to build the infobox's table. I'm not 100% sure, but if it works like wikitext, you'll have to double for every row definition the amount of cells/make those wider cells go over twice the columns as before. On metawikipedia:Help:Table you have a comparison between table wikitext and table HTML.--PedroM (talk) 00:40, September 23, 2012 (UTC)

No offense to the Wikia staff, but it's questions like this that show the damage the visual editor is doing to our user base's knowledge of basic wiki coding. Columns are created in wiki markup by the use of exclamation points to create headers, and pipes to create the columns underneath those headers. Thus, here's the most basic way you get four columns in any table.


 * which results in

Obviously, though, this has no formatting. But you can't do anything with tables if you don't understand the basics of table creation. If you have that skeleton, then it's very easy to create the rest.

Your template utlimately relies on a lot of CSS calls that are peculiar to your wiki. That is, you'll see things like  throughout the base table you're using at w:c:robotising:template:infobox format. We can't replicate that here at community, because we don't have the same CSS as you do, so let me just show you what's going on with a simplified example.

Here's an abbreviated version of your template that builds upon the skeleton, above:

You can see here that on the top line, we've called. This adds some basic formatting, mainly having to do with drawing a grid around each of the cells of the table. Then, we're adding a bit of formatting on each line which says, "center the text in this cell". That makes the right column feel less "lonely" than it looks on your example. You're never going to get away from the fact that your righ column simply hass less text than the left, but centering makes the problem less profound. You end up with something like this:

Obviously though, it's massively inefficient to keep putting in the same fortmatting instructions on each line, so that's where the  stuff comes in. A class call says, "Look in my wiki's CSS files to see if there's a thing that matches this name, then do what that thing is.

So if you wanted to have a class called "fred" which created white text on a purple background, you would go to your MediaWiki:Common.css and enter the following: .fred { text-align:center; valign:middle; color:#fff; background-color:#af2bc8 } Now you can apply that by writing:
 * which would result in the image at right.

Without coming to your wiki and picking it all apart for you, I can't tell you what exactly you need to do to solve the particular problem you're having. You're just going to have to open one window to your Wikia.css page, one to your Common.css page and one to your Template:Infobox format page, and one to your Template:Infobox chassis page. And the you're going to have to figure out what the chassis page is calling frpm the format page, and what the format page is calling from CSS. And then you're going to have to just play around with them until you get the format you want.

But everything you actually need to create the base infobox is in the examples I gave you above. The key to reverse engineering anything is to ignore all the complicated stuff and look for the basic skeleton. Once you can see the pattern of table structure, you can then start to focus on what the "complicated" stuff is. And before you know it, you'll be handling tables with much more confidence. 03:08: Sun 23 Sep 2012