Compartilhar via


IHTMLStyle2 interface

This interface provides access to additional methods of the style element.

Members

The IHTMLStyle2 interface inherits from the IDispatch interface. IHTMLStyle2 also has these types of members:

  • Methods
  • Properties

Methods

The IHTMLStyle2 interface has these methods.

Method Description
getExpression

This element is obsolete and should no longer be used. Retrieves the expression for the given property.

removeExpression

This element is obsolete and should no longer be used. Removes the expression from the specified property.

setExpression

This element is obsolete and should no longer be used. Sets an expression for the specified object.

 

Properties

The IHTMLStyle2 interface has these properties.

Property Access type Description

accelerator

Sets or retrieves a string that indicates whether the object represents a keyboard shortcut.

behavior

Sets or retrieves the location of the Dynamic HTML (DHTML) behaviorDHTML Behaviors.

borderCollapse

Indicates whether the row and cell borders of a table are joined in a single border or detached as in standard HTML.

bottom

Sets or retrieves the bottom position of the object in relation to the bottom of the next positioned object in the document hierarchy.

direction

Specifies the reading order of the object.

imeMode

Specifies the state of an IME.

layoutGrid

Specifies the composite document grid properties that specify the layout of text characters.

layoutGridChar

Specifies the size of the character grid used for rendering the text content of an element.

layoutGridLine

Specifies the gridline value used for rendering the text content of an element.

layoutGridMode

Specifies whether the text layout grid uses two dimensions.

layoutGridType

Specifies the type of grid used for rendering the text content of an element.

lineBreak

Specifies line-breaking rules for text in selected languages such as Japanese, Chinese, and Korean.

overflowX

Sets or retrieves how to manage the content of the object when the content exceeds the width of the object.

overflowY

Sets or retrieves how to manage the content of the object when the content exceeds the height of the object.

pixelBottom

Sets or retrieves the bottom position of the object.

pixelRight

Sets or retrieves the right position of the object.

posBottom

Sets or retrieves the bottom position of the object in the units specified by the IHTMLStyle2::bottom attribute.

position

Sets or retrieves the type of positioning used for the object.

posRight

Sets or retrieves the right position of the object in the units specified by the IHTMLStyle2::right attribute.

right

Sets or retrieves the position of the object relative to the right edge of the next positioned object in the document hierarchy.

rubyAlign

Gets or sets a value that indicates how to align the ruby text content.

rubyOverhang

Gets or sets a value that indicates whether, and on which side, ruby text is allowed to partially overhang any adjacent text in addition to its own base, when the ruby text is wider than the ruby base

rubyPosition

Gets or sets a value that controls the position of the ruby text with respect to its base.

tableLayout

Sets or retrieves a string that indicates whether the table layout is fixed.

textAutospace

Specifies the autospacing and narrow space width adjustment of text.

textJustify

Specifies the type of alignment used to justify text in the object.

unicodeBidi

Read/write

Specifies the level of embedding with respect to the bidirectional algorithm.

wordBreak

Specifies line-breaking behavior within words, particularly where multiple languages appear in the object.

 

Remarks

A style element represents the current settings of all possible inline styles for an element. These settings typically are applied directly to individual HTML elements using the STYLE attribute.

The style element does not give access to the style assignments in style sheets. Use the IHTMLStyleSheetsCollection interface to gain access to the individual style sheets defined in the document.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows 2000 Server

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

IDispatch

Reference

IHTMLStyle

IHTMLStyle3

IHTMLStyle4

IHTMLStyle5