Click to return to the Reusing Browser Technology home page    
IHTMLSpanFlow::get_align ...     IHTMLStyle::get_backgroun...     Interfaces and Scripting ...    
Web Workshop  |  Reusing Browser Technology

IHTMLStyle Interface


The IHTMLStyle interface provides access to the methods that are returned when you access the style object.

IHTMLStyle Methods

get_background Retrieves the value of the background property for the object.
get_backgroundAttachment Retrieves the value of the backgroundAttachment property for the object.
get_backgroundColor Retrieves the value of the backgroundColor property for the object.
get_backgroundImage Retrieves the value of the backgroundImage property for the object.
get_backgroundPosition Retrieves the value of the backgroundPosition property for the object.
get_backgroundPositionX Retrieves the x-coordinate of the backgroundPosition property for the object.
get_backgroundPositionY Retrieves the y-coordinate of the backgroundPosition property for the object.
get_backgroundRepeat Retrieves the value of the backgroundRepeat property for the object.
get_border Retrieves the value of the border property for the object.
get_borderBottom Retrieves the value of the borderBottom property for the object.
get_borderBottomColor Retrieves the value of the borderBottomColor property for the object.
get_borderBottomStyle Retrieves the value of the borderBottomStyle property for the object.
get_borderBottomWidth Retrieves the value of the borderBottomWidth property for the object.
get_borderColor Retrieves the value of the borderColor property of the object.
get_borderLeft Retrieves the value of the borderLeft property for the object.
get_borderLeftColor Retrieves the value of the borderLeftColor property for the object.
get_borderLeftStyle Retrieves the value of the borderLeftStyle property for the object.
get_borderLeftWidth Retrieves the value of the borderLeftWidth property for the object.
get_borderRight Retrieves the value of the borderRight property for the object.
get_borderRightColor Retrieves the value of the borderRightColor property for the object.
get_borderRightStyle Retrieves the value of the borderRightStyle property for the object.
get_borderRightWidth Retrieves the value of the borderRightWidth property for the object.
get_borderStyle Retrieves the value of the borderStyle property for the object.
get_borderTop Retrieves the value of the borderTop property for the object.
get_borderTopColor Retrieves the value of the borderTopColor property for the object.
get_borderTopStyle Retrieves the value of the borderTopStyle property for the object.
get_borderTopWidth Retrieves the value of the borderTopWidth property for the object.
get_borderWidth Retrieves the value of the borderWidth property for the object.
get_clear Retrieves the value of the clear property for the object.
get_clip Retrieves the value of the clip property for the object.
get_color Retrieves the value of the color property for the object.
get_cssText Retrieves the style rule.
get_cursor Retrieves the value of the cursor property for the object.
get_display Retrieves the value of the display property for the object.
get_filter Retrieves a filter or collection of filters for the element.
get_font Retrieves the values of the font-style, font-variant, font-weight, font-size, line-height, and font-family attributes for the element.
get_fontFamily Retrieves the value of the fontFamily property for the object.
get_fontSize Retrieves the value of the fontSize property for the object.
get_fontStyle Retrieves the value of the fontStyle property for the object.
get_fontVariant Retrieves the value of the fontVariant property for the object.
get_fontWeight Retrieves the value of the fontWeight property for the object.
get_height Retrieves the value of the height property for the object.
get_left Retrieves the value of the left property for the object.
get_letterSpacing Retrieves the value of the letterSpacing property for the object.
get_lineHeight Retrieves the value of the lineHeight property for the object.
get_listStyle Retrieves the value of the listStyle property for the object.
get_listStyleImage Retrieves the value of the listStyleImage property for the object.
get_listStylePosition Retrieves the value of the listStylePosition property for the object.
get_listStyleType Retrieves the value of the listStyleType property for the object.
get_margin Retrieves the value of the margin property for the object.
get_marginBottom Retrieves the value of the marginBottom property for the object.
get_marginLeft Retrieves the value of the marginLeft property for the object.
get_marginRight Retrieves the value of the marginRight property for the object.
get_marginTop Retrieves the value of the marginTop property for the object.
get_overflow Retrieves the value of the overflow property for the object.
get_padding Retrieves the value of the padding property for the object in pixels.
get_paddingBottom Retrieves the value of the paddingBottom property for the object in pixels.
get_paddingLeft Retrieves the value of the paddingLeft property for the object in pixels.
get_paddingRight Retrieves the value of the paddingRight property for the object in pixels.
get_paddingTop Retrieves the value of the paddingTop property for the object in pixels.
get_pageBreakAfter Retrieves the value of the pageBreakAfter property for the object.
get_pageBreakBefore Retrieves the value of the pageBreakBefore property for the object.
get_pixelHeight Retrieves the height of the element, in pixels.
get_pixelLeft Retrieves the left position of the element, in pixels.
get_pixelTop Retrieves the top position of the element, in pixels.
get_pixelWidth Retrieves the width of the element, in pixels.
get_posHeight Retrieves the height of the element in pixels.
get_position Retrieves the value of the position property for the object. The property specifies whether the object can be positioned and, if so, the position of the object relative to its parent object.
get_posLeft Retrieves the left position of the element in pixels.
get_posTop Retrieves the top position of the element in pixels.
get_posWidth Retrieves the width position of the object, in pixels.
get_styleFloat Retrieves the value of the float property for the object.
get_textAlign Retrieves the value of the textAlign property for the object.
get_textDecoration Retrieves the value of the textDecoration property for the object.
get_textDecorationBlink Retrieves the value that indicates whether the object's textDecoration property has a value of blink.
get_textDecorationLineThrough Retrieves the value that indicates whether the object's textDecoration property has a value of line-through.
get_textDecorationNone Retrieves the value that indicates whether the object's textDecoration property has a value of none.
get_textDecorationOverline Retrieves the value that indicates whether the object's textDecoration property has a value of overline.
get_textDecorationUnderline Retrieves the value that indicates whether the element's textDecoration property has a value of underline.
get_textIndent Retrieves the value of the textIndent property for the object.
get_textTransform Retrieves the value of the textTransform property for the object.
get_top Retrieves the value of the top property for the object.
get_verticalAlign Retrieves the value of the vertical-align property for the object.
get_visibility Retrieves the value of the visibility property for the object.
get_whiteSpace Retrieves the value of the whiteSpace property for the object.
get_width Retrieves the value of the width property for the object.
get_wordSpacing Retrieves the value of the wordSpacing property for the object.
get_zIndex Retrieves the value of the zIndex property for the object.
getAttribute Retrieves the value of the given attribute.
put_background Sets the value of the background property for the object.
put_backgroundAttachment Sets the value of the backgroundAttachment property for the object.
put_backgroundColor Sets the backgroundColor property for the object.
put_backgroundImage Sets the backgroundImage property for the object.
put_backgroundPosition Sets the value of the backgroundPosition property for the object. The property determines the initial position of the background image, if any.
put_backgroundPositionX Sets the x-coordinate of the backgroundPosition property for the object. The property determines the initial horizontal position of the background image, if any.
put_backgroundPositionY Sets the y-coordinate of the backgroundPosition property for the object. The property determines the initial vertical position of the background image, if any.
put_backgroundRepeat Sets the value of the backgroundRepeat property for the object. The property determines whether and how the background image, if any, is repeated.
put_border Sets the value of the border property for the object. The property describes the color, style, and width of the border to display around the object.
put_borderBottom Sets the value of the borderBottom property for the object. The property determines the width, style, and color of the bottom border.
put_borderBottomColor Sets the value of the borderBottomColor property for the object. The property determines the color of the object's bottom border.
put_borderBottomStyle Sets the value of the borderBottomStyle property for the object. The property determines the style of the bottom border.
put_borderBottomWidth Sets the value of the borderBottomWidth property for the object. The property determines the width of the bottom border.
put_borderColor Sets the value of the borderColor property of the object.
put_borderLeft Sets the value of the borderLeft property for the object. The property determines the width, style, and color of the left border.
put_borderLeftColor Sets the value of the borderLeftColor property for the object. The property determines the color of the object's left border.
put_borderLeftStyle Sets the value of the borderLeftStyle property for the object. The property determines the style of the left border.
put_borderLeftWidth Sets the value of the borderLeftWidth property for the object. The property determines the width of the left border.
put_borderRight Sets the value of the borderRight property for the object. The property determines the width, style, and color of the right border.
put_borderRightColor Sets the value of the borderRightColor property for the object. The property determines the color of the object's right border.
put_borderRightStyle Sets the value of the borderRightStyle property for the object. The property determines the style of the right border.
put_borderRightWidth Sets the value of the borderRightWidth property for the object. The property determines the width of the right border.
put_borderStyle Sets the value of the borderStyle property for the object. The property determines the style of the left, right, top, and bottom borders.
put_borderTop Sets the value of the borderTop property for the object. The property determines the width, style, and color of the top border.
put_borderTopColor Sets the value of the borderTopColor property for the object. The property determines the color of the object's top border.
put_borderTopStyle Sets the value of the borderTopStyle property for the object. The attribute determines the style of the top border.
put_borderTopWidth Sets the value of the borderTopWidth property for the object. The property determines the width of the top border.
put_borderWidth Sets the value of the borderWidth property for the object. The property determines the width of the left, right, top, and bottom borders.
put_clear Sets the value of the clear property for the object.
put_clip Sets the value of the clip property for the object.
put_color Sets the color property for the object.
put_cssText Sets the style rule.
put_cursor Sets the value of the cursor property for the object. The property determines the type of cursor to display when the mouse is over the object.
put_display Sets the value of the display property for the object. The property determines whether the object is rendered.
put_filter Sets a filter or collection of filters for the element.
put_font Retrieves the values of the font-style, font-variant, font-weight, font-size, line-height, and font-family attributes for the element.
put_fontFamily Sets the value of the fontFamily property for the object.
put_fontSize Sets the value of the fontSize property for the object.
put_fontStyle Sets the value of the fontStyle property for the object.
put_fontVariant Sets the value of the fontVariant property for the object.
put_fontWeight Sets the value of the fontWeight property for the object.
put_height Sets the value of the height property for the object.
put_left Sets the value of the left property for the object. The property determines the left position of the object.
put_letterSpacing Sets the value of the letterSpacing property for the object. The property determines the amount of space to add to the default space between letters in the object's text.
put_lineHeight Sets the value of the lineHeight property for the object.
put_listStyle Sets the value of the listStyle property for the object. The property determines how a list-item marker is drawn.
put_listStyleImage Sets the value of the listStyleImage property for the object. The property sets the image to use as the list-item marker. When the image is available, it replaces the marker.
put_listStylePosition Sets the value of the listStylePosition property for the object. The property determines how the list-item marker is drawn with regard to the content.
put_listStyleType Sets the value of the listStyleType property for the object. The property determines the appearance of the list-item marker if the listStyleImage is set to none or if the image pointed to by the URL cannot be displayed.
put_margin Sets the value of the margin property for the object. The property sets the top, right, bottom, and left margins for the text of the object.
put_marginBottom Sets the value of the marginBottom property for the object. The property determines the height of the bottom margin for the object.
put_marginLeft Sets the value of the marginLeft property for the object. The property determines the width of the left margin for the object.
put_marginRight Sets the value of the marginRight property for the object. The property determines the width of the right margin for the object.
put_marginTop Sets the value of the marginTop property for the object. The property determines the height of the top margin for the object.
put_overflow Sets the value of the overflow property for the object.
put_padding Sets the value of the padding property for the object in pixels. The property determines the amount of space between the border and the object's content.
put_paddingBottom Sets the value of the paddingBottom property for the object in pixels. The property determines the amount of space between the border and the bottom of the object's content.
put_paddingLeft Sets the value of the paddingLeft property for the object in pixels. The property determines the amount of space between the border and the left of the object's content.
put_paddingRight Sets the value of the paddingRight property for the object in pixels. The property determines the amount of space between the border and the right of the object's content.
put_paddingTop Sets the value of the paddingTop property for the object in pixels. The property determines the amount of space between the border and the top of the object's content.
put_pageBreakAfter Sets the value of the pageBreakAfter property for the object. The property determines whether a page break occurs after the object and on what page the subsequent content should resume.
put_pageBreakBefore Sets the value of the pageBreakBefore property for the object. The property determines whether a page break occurs before the object, and on what page the subsequent content should resume.
put_pixelHeight Sets the height of the element, in pixels.
put_pixelLeft Sets the left position of the element, in pixels.
put_pixelTop Sets the top position of the element, in pixels.
put_pixelWidth Sets the width of the element, in pixels.
put_posHeight Sets the height of the element in pixels.
put_posLeft Sets the left position of the element in pixels.
put_posTop Sets the top position of the element in pixels.
put_posWidth Sets the width of the object, in pixels.
put_styleFloat Sets the value of the float property for the object. The attribute determines whether the element floats, causing text to flow around it.
put_textAlign Sets the value of the textAlign property for the object. The property determines the alignment of the object's text.
put_textDecoration Sets the value of the textDecoration property for the object.
put_textDecorationBlink Sets the value of the object's textDecoration property to blink, or removes the blink value from the property.
put_textDecorationLineThrough Sets the value of the object's textDecoration property to line-through, or removes the line-through value from the property.
put_textDecorationNone Sets the value of the object's textDecoration property to none, or removes the none value from the attribute.
put_textDecorationOverline Sets the value of the object's textDecoration property to overline, or removes the overline value from the property.
put_textDecorationUnderline Sets the value of the element's textDecoration property to underline, or removes the underline value from the property.
put_textIndent Sets the value of the textIndent property for the object. The property determines the amount of indention before the object's first line of formatted text.
put_textTransform Sets the value of the textTransform property for the object.
put_top Sets the value of the top property for the object. The property determines the top position of the object.
put_verticalAlign Sets the value of the vertical-align property for the object. The property determines the vertical positioning of the object.
put_visibility Sets the value of the visibility property for the object. The property determines whether the content of the object is visible.
put_whiteSpace Sets the whiteSpace property for the object. The property determines whether and how white space characters in the object are displayed.
put_width Sets the value of the width property for the object. The property determines the object's width.
put_wordSpacing Sets the value of the wordSpacing property for the object. The property determines the amount of space to add to the default space between words in the element's text.
put_zIndex Sets the value of the zIndex property for the object. The attribute determines whether the element is positioned above or below the text.
removeAttribute Removes the given property from the object.
setAttribute Sets the value of the given attribute. If the attribute is not already present, the method adds the attribute to the element and sets the value.
toString Retrieves a string representation of the style object.

Interface Information

Implementation System (Mshtml.dll)
Inherits from IDispatch
Header and IDL files Mshtml.h, Mshtml.idl
Minimum availability Internet Explorer 4.0
Minimum operating systems Windows 95, Windows NT 4.0

Windows CE

Windows CE Use version 2.12 and later
Minimum availability Internet Explorer 4.0

Remarks

A style object represents the current settings of all possible inline styles for a given element. Inline styles are cascading style sheets (CSS) assignments that an author applies directly to individual HTML elements using the IHTMLStyle attribute. You use the style object to examine these assignments and either make new assignments or change existing ones.

You retrieve the style object by using the IHTMLElement::get_style function. You retrieve the current setting for an inline style by calling member functions of the style object.

The style object does not give access to the style assignments in style sheets. You can use the IHTMLStyleSheetsCollection interface to gain access to the individual style sheets defined in the document.



Back to topBack to top

Did you find this topic useful? Suggestions for other topics? Write us!

© 1999 Microsoft Corporation. All rights reserved. Terms of use.