793Chapter 30 .Style Sheet and Style Objects Syntax (Remote web server)

793Chapter 30 .Style Sheet and Style Objects Syntax Accessing rule or cssRule object properties: (IE4+) document.styleSheets[index].rules[index].property (IE5-Mac/NN6+) document.styleSheets[index].cssRules[index].property About these objects The rule and cssRule objects are different object model names for the same objects. For IE4+, the object is known as a rule (and a collection of them the rules collection); for NN6 (and IE5/Mac), the object follows the W3C DOM recommenda tion, calling the object a cssRule (and a collection of them the cssRules collection). For the remainder of this section, they will be referred to generically as the rule object. A rule object has two major components. The first is the selector text, which governs which element(s) are to be influenced by the style rule. The second com ponent is the style definition, with its set of semicolon-delimited attribute:value pairs. In both the IE4+ and NN6 object models, the style definition is treated as an object: the style object, which has tons of properties representing the style attributes available in the browser. The styleobject that belongs to a rule object is precisely the same styleobject that is associated with every HTML element object. Accessing style properties of a style sheet rule requires a fairly long refer ence, as in document.styleSheets[0].rules[0].style.color = red but the format follows the logic of JavaScript s dot-syntax to the letter. Properties cssText Value: String Read/Write NN2 NN3 NN4 NN6 IE3/J1 IE3/J2 IE4 IE5 IE5.5 Compatibility . ( ) The cssText property returns the full text of the current cssRule object. This property is available in NN6 and IE5/Macintosh. While the text returned from this property can be parsed to locate particular strings, it is easier and more reliable to access individual style properties and their values via the styleproperty of a cssRule object. Related Items: style property. parentStyleSheet Value: styleSheet Object Read-Only ruleObject.parentStyleSheet
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Leave a Reply