Forum:Editing Template:Hidden

Hello. I would like to edit my wiki's Template:Hidden, so that the "[show]" button resembles the show/hide button in the table of contents (colored, underlined). Can I do this just by making changes to the template itself? Or do I need some form of css code uploaded?

Thank you,

-- 01:24, September 5, 2012 (UTC)


 * Your wiki is on Mediawiki 1.19. You can native  classes - see Help:Collapsing for details.


 * To make the styling more closely resemble the toggle found in the TOC, you can add this to your Common.css:


 * You can also edit MediaWiki:Collapsible-expand and MediaWiki:Collapsible-collapse to change the expand/collapse buttons to hide/show.


 * Thank you. That has worked quite well. I was wondering, is there any way to move the Expand/Collapse button next to text, rather than having it on the far side of the page? Or is that impossible?
 * -- 03:02, September 6, 2012 (UTC)


 * Your collapse button does show up next to the title text. (Aren't you seeing the same thing?) If you don't apply  to   like Community Central and some other wikis, it won't appear in the right corner.


 * No, the collapse button is across from the text. I think you must be looking at the template. Per Dzylon's advice above, I've replaced the template with the table, and the results can be seen here. I'm not using  to   as far as I can tell, so is there anyway to move the collapse button next to text?-- 05:31, September 6, 2012 (UTC)


 * Oh now I understand. But as you are using the  method, you can hardly make the button left-adjust because its HTML syntax doesn't fit. If you add   to your CSS, your collapse button will be placed before the title text, not after. If you want to do so, I recommand you to use the old   method or the Navbox source (both of them require some CSS fix).

In that case, returning to my original question, what css code would I need to make the show/hide button of my wiki's Template:Hidden resemble the colored links I currently have on this page?

Thank you,

-- 11:13, September 6, 2012 (UTC)


 * line 1 : turn off bold effect
 * line 2 : change color and the cursor of the mouse pointer
 * line 3 : underline text on rollover


 * Brilliant. Exactly what I wanted. Thank you for your help.


 * -- 12:36, September 6, 2012 (UTC)


 * Having had the css active for a time now, I see that it affects every show/hide button on the wiki. I should have realized that immediately, but unfortunately I did not. If I use the css code, it mucks up the color scheme of just about every other template that uses the button. In light of that, is there a way I can edit my wiki's Template:Hidden itself to make the aesthetic changes?
 * -- 13:21, September 7, 2012 (UTC)


 * Sure. Firstly, surround your code with  and put it in a MediaWiki:WhateverYouWant page.

 span.collapseButton { font-weight:normal } span.collapseLink { color:#006cb0; cursor:pointer; } span.collapseLink:hover { text-decoration:underline }
 * Then insert  at the top of your Template:Hidden source. This Verbatim tag allows you to call script only on specific page.


 * More clever way to this. Wrap your template with an another div, for example, then edit the CSS code like next


 * And boom, it's done.


 * Brilliant. Exactly what I wanted (for reals this time). Thank you for your help and your patience.-- 00:16, September 8, 2012 (UTC)