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. Lcawte1.png – Talk - My Wikia's list - New Wiki Watchlist 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)
 * Nevermind i fixed it =) Can one do drop down lists?


 * EmperorZelos 13:04, March 18, 2010 (UTC)


 * Drop down lists in table or div? There are some show/hide divs at w:c:gintama that you can copy, e.g. template:todo, any of the OST opening and ending themes (template:OPED), provided the div css styles are already in your monaco.css Gin-san (Talk) 08:51, April 21, 2010 (UTC)


 * For show/hide divs, the following goes into Common.css (colours and backgrounds can be changed)

.NavFrame { background: #f9f9f9; border: 1px #aaa solid; padding: 5px; } .NavFrame .NavHead { background: #8DA7D6; border: 1px #aaa solid; text-align: center; font-weight: bold; } .NavFrame .NavContent { padding: 5px 0 } .collapsibleButton { font-weight: normal } .collapsibleLink { color: #002BB8 }
 * Very good examples of how to actually make the lists can be found at w:c:dev:ShowHide. The 888th Avatar   (talk)  09:42, April 21, 2010 (UTC)