Forum:Table styles dont workon new wiki

I recently created a wiki for others to use and i try using this code

! Simple collapsible table |- | Lorem ipsum dolor sit amet |} to get this table
 * {|class="wikitable" style="text-align: center;"

! Simple collapsible table
 * Lorem ipsum dolor sit amet
 * }
 * }

but when i use it i get like this


 * {|style="text-align: center;float:left;"

! Simple collapsible table
 * Lorem ipsum dolor sit amet
 * }
 * }

I am aware the code is different here but it is to show how it is here, and the wiki is new so why is it giving different ones? Do i need to do something to the new wiki?

EmperorZelos 12:26, March 17, 2010 (UTC)


 * Yes indeed. Chances are, the new wiki doesn't have a class called "wikitable", so you need to create it. Here's what MediaWiki:Common.css here shows.

table.wikitable, table.prettytable { margin: 1em 1em 1em 0; background: #f9f9f9; border: 1px #aaa solid; border-collapse: collapse; } .wikitable th, .wikitable td, .prettytable th, .prettytable td { border: 1px #aaa solid; padding: 0.2em; } .wikitable th, .prettytable th { background: #f2f2f2; text-align: center; } .wikitable caption, .prettytable caption { margin-left: inherit; margin-right: inherit; font-weight: bold; }
 * Copy all that the the Common.css on your wiki, and it should work. On a related note, did you want collapsible tables as well? For that, you can just follow instructions from this page. The 888th Avatar   (talk)  12:34, March 17, 2010 (UTC)
 * How do i exacly access the common.css?


 * EmperorZelos 12:57, March 17, 2010 (UTC)


 * Type "MediaWiki:Common.css" into the search bar. It'll show, and if you're an admin, you can edit it. The 888th Avatar   (talk)  13:04, March 17, 2010 (UTC)
 * thank you i found it, but the collapsable stuff doesnt work as the thing says, i use the exact same codes (these copied from there) and i get no hide/show on them even here, why? EmperorZelos 13:12, March 17, 2010 (UTC)


 * That will require some JavaScript to go in Common.js - I'll let someone else post that as I fail at JavaScript. 16:05, March 17, 2010 (UTC)


 * EmperorZelos, can you please post a link to your wiki? That would help. :) The 888th Avatar   (talk)  22:30, March 17, 2010 (UTC)