GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||
GeezerVison is showing www.mediawiki.org — Extension:CSS - MediaWiki
The CSS extension allows CSS stylesheets to be included in specific articles. The CSS can be another article, a file or can be rules defined directly within the parser-function. UsageFor example, if you have a CSS article called "MyStyles.css", which are the styles intended for use with the article "MyFancyUserPage", you would add the following parser-function syntax to the latter, {{#css:MyStyles.css}} If on the other hand "MyStyles.css" was a file in the /wiki/skins directory, then it would be included as shown below. Note that the file must be an absolute path with a leading slash to distinguish it from an article title. {{#css:/skins/MyStyles.css}} Alternatively, CSS rules can be directly included within the parser-function (inline) as in the following example, {{#css: body { background: yellow; color: red; font-size: 1.25rem; } }} Installation
ConfigurationOptionally, you can set the base URL for external files. $wgCSSPath = false; # Default, relative to $wgScriptPath $wgCSSPath = ''; # Relative to the root of your server $wgCSSPath = 'https://example.org/stylesheets'; # Relative to a different site Tips
Using the parser function to use the CSS from another page does not work to change the color or background of the page, however, using the parser function on a single page by itself does allow the background to be changed. To overcome this problem, it is possible to load the CSS through transclusion, which does not cause the problem of failing to load the change to the page background. See also
Categories:
Hidden categories: | ||||||||||||||||||||||||||||
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. | ||||||||||||||||||||||||||||