Forum:How to do a retractable template

I have seen that Wikipedia and some wikis make use of retractable boxes with a show/hide button. I thought it would be useful to adopt to include non-canon information in the wikis. However the source of those templates is too complex and I still haven't figured out the commands and syntax that can make a simple retractable "box" or "frame" with text in it, viewable at will. Can you redirect me to some relevant resource? MoffRebusMy Talk 16:44, 28 August 2009 (UTC)
 * Could you give an example of a template on a Wiki(pedia) that uses this? Mark (Tedjuh10) - Talk 17:54, 28 August 2009 (UTC)
 * All the Wikipedia navboxes, such as http://en.wikipedia.org/wiki/Template:Leisure_Suit_Larry. There is a hide/show on the upper right. Unfortunately this template uses another template etc, and it's very hard to read and understand the "commands". Now, I don't want to make a navbox or infobox. I want to write some prose text in my wiki, viewable at will, without distracting the reader. MoffRebusMy Talk 18:07, 28 August 2009 (UTC)
 * You could use (change the #'s for colors):

If you want to use a template, you could use:

And then you could add a #switch for different colours. Mark (Tedjuh10) - Talk 18:33, 28 August 2009 (UTC)

Thanks!!!! MoffRebusMy Talk 18:44, 28 August 2009 (UTC)


 * No problem, however, sometimes some changes are required to make this work; if it isn't collapsible, please leave a message here. Mark (Tedjuh10) - Talk 18:48, 28 August 2009 (UTC)


 * Can you have a look here? http://dune.wikia.com/wiki/Template_talk:Nc. It's not collapsed and there is no option or "button" MoffRebusMy Talk 18:52, 28 August 2009 (UTC)


 * Mmm... I thought that would work. Try copying the following in your MediaWiki:Common.css:

/* --- NAVFRAME STUFF --- */ /* Standard Navigationsleisten, aka box hiding thingy from .de. */ /* Documentation at wikipedia:Wikipedia:NavFrame. */ div.Boxmerge, div.NavFrame { margin: 0px; padding: 4px; border: 1px solid #aaa; text-align: center; border-collapse: collapse; font-size: 95%; } div.Boxmerge div.NavFrame { border-style: none; border-style: hidden; } div.NavFrame + div.NavFrame { border-top-style: none; border-top-style: hidden; } div.NavPic { background-color: #fff; margin: 0px; padding: 2px; float: left; } div.NavFrame div.NavHead { height: 1.6em; font-weight: bold; background-color: #ccf; position:relative; } div.NavFrame p { font-size: 100%; } div.NavFrame div.NavContent { font-size: 100%; } div.NavFrame div.NavContent p { font-size: 100%; } div.NavEnd { margin: 0px; padding: 0px; line-height: 1px; clear: both; } a.NavToggle { position:absolute; top:0px; right:3px; font-weight:normal; font-size:smaller; } Mark (Tedjuh10) - Talk 19:07, 28 August 2009 (UTC)