Applying style sheet classes on WikiPages

A CSS style can be defined in a style sheet (probably .../templates/default/jspwiki.css, unless you have defined your own template in jspwiki.properties). JSPWiki comes with some pre-defined styles.

To apply a CSS style use this notation:

Wiki notation Effect
%%stylename ... %% start styled section using class stylename content: normal WikiNotation to be styled close styled section

Applying in-line CSS styles

The notation for in-line CSS drops the stylename parameter, replacing it with style definitions surrounded by parantheses:

Wiki notation Effect
This is normal text. %%(color:red)This text is red.%% This is normal text again. This is normal text.
This text is red.
This is normal text again.

Examples

HowToColorText HowToCenterText

Caveats

Inline CSS definitions are supported on wikipages starting with JSPWiki version 2.1.38. For block usage a div tag is rendered, for inline usage a span tag.

Add new attachment

In order to upload a new attachment to this page, please use the following box to find the file, then click on “Upload”.
« This page (revision-44) was last changed on 26-Sep-2007 23:19 by JanneJalkanen [RSS]