Forum:Table styling

I've been trying to figure how to make a style for a table that would only have you need to type it once, just like when you type class=wikitable and it sets an entire "layout" for a table. It seems I need to edit the css of the wiki or something like that, and I've been searching for how to do it since yesterday, but all I find is always how to make a table in css, or how to make tables in html, and when I try to search for uses in wiki, I find how to make tables on wiki markup... I also tried to find the base coding that other wikis that have this use, but I couldn't find it, so, I'm afraid I'll have to come to this: How do I do it? I simply have no clue at all. I thought about just making a template that would set the beginning and end, and you'd just type the basics of the table, but you'd still need to type the colors on all rows, so it wouldn't be so practical.

Here's what I want the table to look like: table example

The wiki already haves similar ones on some templates such as the one found here: template table

PS: I didn't really mind to make an optimal coding in there, just made something to show how it looks like.

So, how do I make a style like this to use in the entire wiki? Or, if that's possible (I don't think so, but asking doesn't hurt, right?), how do I set a table configuration using only a template (like setting a heading color, then even and odd colors, so that you only need to make the table normally in middle of the template)?

Yechnagoth 13:00, December 26, 2011 (UTC)


 * For the entire table, apply something similar to this with css:


 * For the heading:


 * For the subheadings:


 * And for the content sections:


 * Then you would add something similar to this to the template:

--
 * You can change the width for the template by simply using  and feel free to change all of the generic css names I used above.

And kinda random question, but what's the difference between and (since you've changed one for another)? Yechnagoth 16:29, December 26, 2011 (UTC)
 * Thanks, but that does just what I could do with a template (still needs to entry class in every row to change the colors). What I mean is something that only needs you to entry a single class value that will do the table for you (just like class=wikitable does). I'm sorry, I should have given an example of one that does that to explain it better. Here it is: example. I tried to find how they did it, but wasn't able to. That example of mine was just to show how it would look.