HTML and CSS Reference
In-Depth Information
a class of the <p> tag named abstract with the specified properties. The
equivalent CSS rules would be:
P.bold {font-weight : bold}
P.abstract {left-margin : 20pt;
right-margin : 20pt;
font-style : italic;
text-align : justify
}
Once defined, use a JSS class just like any CSS class: with the class at-
tribute and the class name.
Like CSS, JSS also lets you define a class without defining the tag that
uses the class. This lets you define generic classes that you can later
apply to any tag. To create a generic style class in JSS, use the special
tag property all :
classes.green.all.color = "green";
You can then add class="green" to any tag to have Netscape render its
contents in green. The equivalent CSS is:
.green {color : green}
12.4.1.5. Using contextual styles
One of the most powerful aspects of CSS is its contextual style capabil-
ity, wherein the browser applies a style to tags only if they appear in the
document in a certain nesting. JSS supports contextual styles as well,
through the special contextual() method within the tags property. The
 
Search WWH ::




Custom Search