Content deleted Content added
m syntaxhighlight |
Reverting edit(s) by 102.45.18.254 (talk) to rev. 1297657178 by Annh07: Unexplained content removal (UV 0.1.6) |
||
(25 intermediate revisions by 17 users not shown) | |||
Line 56:
===Usage===
An HTML element may be just taken from the wikitext (see [[Help:HTML in wikitext|HTML in wikitext]]), e.g., span, or the result of translating wikitext, e.g., the <code><nowiki>'''...'''</nowiki></code> code is changed into
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.
Line 73:
You can use CSS styling in HTML elements in your code (see [[Help:HTML in wikitext]] for a list of elements supported by MediaWiki) like you would in normal HTML markup.
For example, a
<syntaxhighlight lang="html">
<div style="float:right; border:thin solid green;">
Line 89:
Some wikitext elements allow you to insert CSS styling directly into them. An example is the table syntax:
{{-}}
<syntaxhighlight lang="wikitext">
{| style="your style here"
|-
|your table stuff
|}
</syntaxhighlight>
{{Further2|[[Help:Tables]]}}
Line 113:
One extreme "style" for a text is not displaying it, with
<syntaxhighlight lang="css">
.''classname'' {display: none}▼
</syntaxhighlight>
etc.
Line 126 ⟶ 128:
=== Non-print ===
One can exclude content from being printed
<syntaxhighlight lang="html">
<div class="someclass noprint">This will not appear in the print version.</div>
Line 156 ⟶ 158:
=== Variable class or id ===
A class or id can depend on the result produced by a template or on a template parameter, e.g. <syntaxhighlight lang="
In the simplest case we have e.g. <syntaxhighlight lang="
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 [[MediaWiki:Common.css]], which applies for all users and all skins, as far as not overridden.
|