[Mediawiki-l] Can I change the toolbox Style in main.css

Alexis Moinet alexis.moinet at fpms.ac.be
Fri Jun 1 11:50:36 UTC 2007


Julia Reek wrote :
> Hi,
> at the moment i'm changing the layout of my media wiki...
> but i have a big problem:
> 
> where can i change the style of the tool box!?
> i'm using monobook. if i look at my page--> view page source--> it tell
> me that the toolbox is class p-tb...but i can't find that class in my
> main.css...
> i even wrote that class...but it doesn't work...seems the style is
> configuered some where else...or something else....

normally, you change it in main.css (and maybe in monobook.php if you need to change the name of the class/id or the <div> position on the page) OR/AND in the wiki page [[Mediawiki:Monobook.css]] (or [[Mediawiki:Common.css]] if you want it to be used in 
every skin)

creating the properties of #p-tb in main.css should work just fine (*don't forget to force-refresh your browser*) but check whether your wiki pages [[Mediawiki:Monobook.css]] and [[Mediawiki:Common.css]] don't have #p-tb, because it would overwrites the 
main.css properties

then try this :

#p-tb {
	border: 1px solid red;
}

save main.css and press ctrl+F5 in your browser, your toolbox border should be red

If you want to move the toolbox, you *might* have to move the code from line 178-230 of monobook.php (mw 1.10.x) :

<div class="portlet" id="p-tb">
	<h5><?php $this->msg('toolbox') ?></h5>
	<div class="pBody">
...
...
...
	wfRunHooks( 'MonoBookTemplateToolboxEnd', array( &$this ) );
?>
		</ul>
	</div>
</div>

and move them outside of the <div id="column-one"> ...</div> "big block" into another block (e.g. <div id="toolbox-div">) or to another place in that "big block"

PS : if changing #p-tb doesn't affect your skin (but it should), try to change this in monobook.php:

<div class="portlet" id="p-tb">
	<h5><?php $this->msg('toolbox') ?></h5>
	<div class="pBody">

to

<div class="toolbox" id="p-tb">
	<h5><?php $this->msg('toolbox') ?></h5>
	<div class="tbbody">

then create the .toolbox {} and .tbbody {} in main.css or [[Mediawiki:Monobook.css]] and personalize them



More information about the MediaWiki-l mailing list