getElement(id).settings.css("styleName", "style")
or getElement(id).settings.css({"style name 1": "style 1", "style name 2": "style 2"})
Applies the CSS style(s) to the element.
Example:
[js highlight=”2″ try=”true”]
newText(“frame”, “framed”)
.settings.css(“border”, “solid 1px black”)
,
newText(“sentence”, “The last word of this sentence is “)
.settings.after( getText(“frame”) )
.print()
[/js]
Prints a text reading The last word of this sentence is framed, with the last word (framed) framed in a box with 1px black borders.