DekGenius.com
Team LiB   Previous Section   Next Section
Document.getOverrideStyle( ) get the override style for a specified element

Availability

DOM Level 2 CSS

Synopsis

CSSStyleDeclaration getOverrideStyle(Element elt, 
                                     String pseudoElt);

Arguments

elt

The element for which the override style is desired.

pseudoElt

The pseudoelement of elt, or null if there is none.

Returns

A CSSStyleDeclaration object that represents the override style information for the specified element and pseudoelement. The returned object typically also implements the more commonly used CSS2Properties interfaces.

Description

This method returns a CSSStyleDeclaration object (which typically also implements CSS2Properties) for a specified element and optional pseudoelement. You may make use of this returned object to make changes to the displayed style of the specified element without disturbing the inline style of that element and without modifying the style sheets of the document. Conceptually, the returned value represents a style declaration within an "override" style sheet that takes precedence over all other style sheets and inline styles (except for !important declarations in the user style sheet).

Note that this method is defined not by the Document interface but by the DocumentCSS interface. If an implementation supports the CSS module, the Document object always implements DocumentCSS and defines this method.

See Also

CSSStyleDeclaration, CSS2Properties, AbstractView.getComputedStyle( ), HTMLElement.style

    Team LiB   Previous Section   Next Section