Thread:Project:Support desk/Unable to Hide Tabs/reply

In MediaWiki:Common.css you can only write CSS code. (Well in fact you could write anything there, but if it is no CSS code, it won't work.)

The code which you have posted above is PHP code, which does not belong in MediaWiki:Common.css. You must write it in a PHP file, maybe in your template file. This is the file skins/Vector.php, if you are using the Vector skin.

Then this code checks, if the user is an anonymous user ("if( $wgUser->isAnon )") and if it is, then the code  #ca-viewsource { display: none !important; } is given out. This code belongs in the HTML pages, which are generated by MediaWiki. Then it hides the HTML element with the id "ca-viewsource".

This will only work, if the output is placed in the skins head: In Vector.php you see an HTML structure. This is the basic structure out of which your wiki pages are made up. The complete PHP code you posted above belongs inside the "head" section of this structure. Then (if the user is anonymous) the line "<style type="text ....." will be part of your output and will hide the HTML element with that id.