Defines a CSS rule in a CSS style sheet.
Browser/User Agent Support
| IE | Mozilla | Netscape | Opera | Safari | Netscapte | 6.0+ | 1.0+ | no | 9.0+ | 1.0+ | no |
|---|
Constructors
| Constructor | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Defines a CSS rule in a CSS style sheet. | 6.0+ | 1.0+ | no | 9.0+ | 1.0+ | no |
Properties
| Property | IE | Mozilla | Netscape | Opera | Safari | Netscapte |
|---|---|---|---|---|---|---|
Text for the current CSS rule. | 6.0+ | 1.0+ | no | 9.0+ | 1.0+ | no |
Parent rule for the current CSS rule. | 6.0+ | 1.0+ | no | 9.0+ | 1.0+ | no |
CSS style sheet that contains the rule. | no | 1.0+ | no | 9.0+ | 1.0+ | no |
Type of CSS rule. | no | 1.0+ | no | 9.0+ | 1.0+ | no |
References
Availability
HTML DOM Level 2 | W3C
Constructor Detail
Property Detail
String cssText - read only
Text for the current CSS rule.
-
For examples, see the quirksmode test page:
- Remarks
-
If you specify an invalid value for
cssText, the property may throw one of the following DOMExceptions:HIERARCHY_REQUEST_ERR- CSS rule is not legal in the current location in the CSS style sheet.INVALID_MODIFICATION_ERR- New value for the CSS rule is for a different type than the previous type.NO_MODIFICATION_ALLOWED_ERR- The CSS rule or its parent CSS style sheet is read-only.SYNTAX_ERR- CSS syntax error.
- Availability
HTML DOM Level 2 | W3C
CSSRule parentRule - read only
Parent rule for the current CSS rule.
- Availability
HTML DOM Level 2 | W3C
CSSStyleSheet parentStyleSheet - read only
CSS style sheet that contains the rule.
-
For examples, see the quirksmode test page:
- Availability
HTML DOM Level 2 | W3C
Number type - read only
Type of CSS rule.
- Availability
HTML DOM Level 2 | W3C
