HTML and CSS Reference
In-Depth Information
parameters to this method are the tags and classes that define the con-
text in which Netscape applies the style. For example:
tags.contextual(tags.UL, tags.UL, tags.LI).listStyleType = 'disc';
defines a context wherein the elements ( tags.LI ) of an unordered list
nested within another unordered list ( tags.UL , tags.UL ) use the disc as
their bullet symbol. The CSS equivalent is:
ul ul li {list-style-type : disc}
You can mix tags and classes in the contextual() method. For instance:
tags.contextual(classes.abstract.P, tags.EM).color = 'red';
tells the browser to display in red <em> tags that appear within para-
graphs that are of the abstract class. The CSS equivalent is:
p.abstract em {color : red}
Because the tags object is unambiguously included within the contextu-
al() method, you may omit it from the definition. Hence, our nested list
example may be rewritten as:
tags.contextual(UL, UL, LI).listStyleType = 'disc';
Search WWH ::

Custom Search