This page will be explaining how to change the styles of one specific page, using CSS.
Usage[]
You can add the .page-PAGENAME
class before any other CSS styles, which will target the page called PAGENAME (including the namespace text).
To target the namespace, append .ns-NS#
to the page name selector (with no space) where NS# is a namespace ID.
Example[]
/* Selects "CSS Applied To One Page" in the main namespace */
.page-CSS_Applied_To_One_Page.ns-0 .WikiaPageContentWrapper {
color: purple;
}
/* Selects "Policy" in this wiki's project namespace */
.page-Customize_Your_Wiki_Policy.ns-4 .WikiaPageContentWrapper {
color: purple;
}
/* PROBLEMATIC: Selects "Customize Your Wiki Policy" in the main namespace
AND "Policy" in this wiki's project namespace */
.page-Customize_Your_Wiki_Policy .WikiaPageContentWrapper {
color: purple;
}
Advanced[]
You can also select:
- The action (like view or edit) with
.action-ACTION
where ACTION is the action - Pages the current user can edit with
.mw-editable
- The root page of a subpage with
.rootpage-ROOTPAGE
where ROOTPAGE is the root page (for exampleHi
is the root page ofHi/Subpage
)
in the same way as selecting a namespace (remember: no spaces in between these special selectors, but spaces in between them and your other selectors)