Cascading Style Sheets allow for flexible formatting of a page. They should be used instead of tables for non-tabular content whenever possible, because they can be manipulated by the reader or overridden by an author if your CSS is embedded in another page via a template.
Alternatively, style is specified for CSS selectors, expressed in terms of elements, classes and id's. This is done on various levels:
Author style sheets, in this order:
Note: See for a list of all the style sheets loaded.
User style sheet:
A HTML element may be just taken from the wikitext (see HTML in wikitext), e.g. span, or the result of translating wikitext, e.g. the <nowiki></nowiki> code is changed into ''', or part of the code for the skin.
A class may be produced by the software, e.g. ns-namespace number for the HTML-element "body", and extiw for an interwiki link in the page body, or taken from the wikitext.
Similarly an id may be produced by the software, e.g. bodyContent, or taken from the wikitext.
In the case of conflicting style settings for a piece of content, the resulting setting depends primarily on the indication "!important". Secondarily, if both are important, the user wins, if neither is, the author wins. Tertiarily it depends on specificity. Only lastly it depends on order between and within style sheets: the last wins. Thus a User:username/monobook.css does not win from MediaWiki:Monobook.css (both author, not user) if the specificity of the latter is greater. See also cascade.
For example, a <b> element with a green border and its contents floated to the right would be created with
Here comes a short paragraph that is
contained in a "div" element that is
floated to the right.
| your table stuff |
Vector is the default style, you can view it at: http://en.wikipedia.org/skins-1.5/vector/main-ltr.css
You will give your CSS tag an existing "class"
Please put a list of existing classes here.
.''classname'' {display: none}
#''id'' {display: none}
etc.
Non-displayed links do not work (as opposed to links in a very small font).
It cannot be used to remove text in expressions for template names, parameter names, parameter values, page names in links, etc.
To view hidden text, download the Web Developer Toolbar for Firefox here, then choose Misc. -> show hidden elements in that toolbar. It will make all hidden elements appear.
The portlet class is the style used by all the div blocks around the main content. Identified blocks using that class:
The footer at the bottom of the page includes blocks with the following ids
In the simplest case we have e.g. class="abc{{{1|def}}}" and define class abcdef. If the parameter value is "def" it applies.
If a page for general use only makes sense when styles are defined for certain classes, then these have to be specified in the page , which applies for all users and all skins, as far as not overridden.
{{{1}}}
displays "Wed" if parameter 3 is defined, but its value is not "none", and displays nothing if parameter 3 is undefined or "none". If the value of parameter 3 is a display style other than "none", that style is applied.