IHTMLStyleSheet::removeRule method

Deletes an existing style rule for the styleSheet object, and adjusts the index of the rules collection accordingly.

Syntax

Integer removeRule(
  [in, optional] Integer iIndex
);

Parameters

  • iIndex [in, optional]
    long that specifies the index value of the rule to be deleted from the style sheet. If an index is not provided, the first rule in the rules collection is removed.

Remarks

The document does not automatically reflow when the rule is removed. To see the change, you must reflow the document. You can reflow the objects affected using a number of methods. For example, you can reflow the style change only on affected text by setting the text equal to itself. Alternately, you can reload the entire document using the IHTMLLocation::reload method. When you use the IHTMLTable::refresh method on a table, its content is reflowed.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IHTMLStyleSheet

Reference

IHTMLStyleSheet::addRule

rules

styleSheets