Manual:Removing tabs

From mediawiki.org
(Redirected from Manual:Remove Tabs)
See also Manual:Interface/Sidebar to remove the links in the sidebar.

The tabs on MediaWiki can be removed by adding the following code to MediaWiki:Common.css.

Remove tabs[edit]

Add the following code to MediaWiki:Common.css to remove corresponding tabs:

Code Explanation
#ca-nstab-main { display: none !important; } Page tab
#ca-nstab-user { display: none !important; } User page tab (the Page tab on personal user pages)
#ca-talk { display: none !important; } Discussion tab
#ca-view { display: none !important; } Read tab (from the prepackaged skins this tab is available only in the Vector skin)
#ca-edit { display: none !important; } Edit tab. Edit source when Visual Editor is installed.
#ca-ve-edit { display: none !important; } Edit tab when Visual Editor is installed.
#ca-formedit { display: none !important; } Edit with Form tab when Page Forms are installed.
#ca-history { display: none !important;} View history/History tab
#ca-watch { display: none !important; } the Watch tab for adding the page to the watchlist
#ca-unwatch { display: none !important; } the Unwatch tab for removing the page from the watchlist
#ca-delete { display: none !important; } Delete tab (in the Vector skins it's displayed with the More drop-down menu)
#ca-move { display: none !important; } Move tab (in the Vector skin it's part of the More drop-down menu)
#ca-protect { display: none !important; } Protect tab (as the previous two, with the Vector skin it's in the More drop-down menu)
#ca-viewsource { display: none !important; } View source tab; this tab is available for users who belong to user groups that don't have the permission to edit pages. With it the user can view the source text of the page without being able to modify it.

Remove Tabs from Specific Pages[edit]

It is possible to remove a tab only from a particular page(s) of your choice. For example, the following:

body.page-Main_Page li#ca-delete { display: none !important; }

will hide the Delete tab on the Main Page.

You only have to replace the ID of the tab and the name of the page. In the above example the ID of the tab is #ca-delete and the name of the page Main_Page.

So, for example, if you want to remove the Discussion tab on a page with the name "Example Page", use this code:

body.page-Example_Page li#ca-talk { display: none !important; }

If the name of the page consists of more than one word, put underscores (_) between the words.

Lines between tabs[edit]

In the Vector skin, the light blue fading lines between tabs is called the div.vectorTabs span. The light blue fading lines on the sides are left-navigation and right-navigation.

See this help page topic for more information

See also[edit]

Topic on Project:Support desk: