IHTMLStyle

IHTMLStyle


This interface provides access to the methods that are returned when you access the style object. A style object represents the current settings of all possible inline styles for a given element. Inline styles are CSS style assignments that an author applies directly to individual HTML elements using the STYLE 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. To obtain information about styles in style sheets, you must use the IHTMLStyleSheetsCollection interface to gain access to the individual style sheets defined in the document.

IHTMLStyle Methods
put_fontFamily   get_fontFamily   put_fontStyle  
get_fontStyle   put_fontVariant   get_fontVariant  
put_fontWeight   get_fontWeight   put_fontSize  
get_fontSize   put_font   get_font  
put_color   get_color   put_background  
get_background   put_backgroundColor   get_backgroundColor  
put_backgroundImage   get_backgroundImage   put_backgroundRepeat  
get_backgroundRepeat   put_backgroundAttachment   get_backgroundAttachment  
put_backgroundPosition   get_backgroundPosition   put_backgroundPositionX  
get_backgroundPositionX   put_backgroundPositionY   get_backgroundPositionY  
put_wordSpacing   get_wordSpacing   put_letterSpacing  
get_letterSpacing   put_textDecoration   get_textDecoration  
put_textDecorationNone   get_textDecorationNone   put_textDecorationUnderline  
get_textDecorationUnderline   put_textDecorationOverline   get_textDecorationOverline  
put_textDecorationLineThrough   get_textDecorationLineThrough   put_textDecorationBlink  
get_textDecorationBlink   put_verticalAlign   get_verticalAlign  
put_textTransform   get_textTransform   put_textAlign  
get_textAlign   put_textIndent   get_textIndent  
put_lineHeight   get_lineHeight   put_marginTop  
get_marginTop   put_marginRight   get_marginRight  
put_marginBottom   get_marginBottom   put_marginLeft  
get_marginLeft   put_margin   get_margin  
put_paddingTop   get_paddingTop   put_paddingRight  
get_paddingRight   put_paddingBottom   get_paddingBottom  
put_paddingLeft   get_paddingLeft   put_padding  
get_padding   put_border   get_border  
put_borderTop   get_borderTop   put_borderRight  
get_borderRight   put_borderBottom   get_borderBottom  
put_borderLeft   get_borderLeft   put_borderColor  
get_borderColor   put_borderTopColor   get_borderTopColor  
put_borderRightColor   get_borderRightColor   put_borderBottomColor  
get_borderBottomColor   put_borderLeftColor   get_borderLeftColor  
put_borderWidth   get_borderWidth   put_borderTopWidth  
get_borderTopWidth   put_borderRightWidth   get_borderRightWidth  
put_borderBottomWidth   get_borderBottomWidth   put_borderLeftWidth  
get_borderLeftWidth   put_borderStyle   get_borderStyle  
put_borderTopStyle   get_borderTopStyle   put_borderRightStyle  
get_borderRightStyle   put_borderBottomStyle   get_borderBottomStyle  
put_borderLeftStyle   get_borderLeftStyle   put_width  
get_width   put_height   get_height  
put_styleFloat   get_styleFloat   put_clear  
get_clear   put_display   get_display  
put_visibility   get_visibility   put_listStyleType  
get_listStyleType   put_listStylePosition   get_listStylePosition  
put_listStyleImage   get_listStyleImage   put_listStyle  
get_listStyle   put_whiteSpace   get_whiteSpace  
put_top   get_top   put_left  
get_left   get_position   put_zIndex  
get_zIndex   put_overflow   get_overflow  
put_pageBreakBefore   get_pageBreakBefore   put_pageBreakAfter  
get_pageBreakAfter   put_cssText   get_cssText  
put_pixelTop   get_pixelTop   put_pixelLeft  
get_pixelLeft   put_pixelWidth   get_pixelWidth  
put_pixelHeight   get_pixelHeight   put_posTop  
get_posTop   put_posLeft   get_posLeft  
put_posWidth   get_posWidth   put_posHeight  
get_posHeight   put_cursor   get_cursor  
put_clip   get_clip   put_filter  
get_filter   setAttribute   getAttribute  
removeAttribute   toString  

IHTMLStyle::get_background

HRESULT get_background(
    BSTR *p 
);

Retrieves the value of the CSS background attribute for the element.

p
Address of a variable that receives the value of the attribute. See background for details. This parameter receives NULL if the attribute is not set.

See also put_background

IHTMLStyle::get_backgroundAttachment

HRESULT get_backgroundAttachment( 
    BSTR *p 
);

Retrieves the value of the CSS background-attachment attribute for the element.

p
Address of a variable that receives the value of the attribute, which can be one of these strings:
fixed Background image remains fixed.
scroll Background image scrolls with text.
See background-attachment for details.

See also put_backgroundAttachment

IHTMLStyle::get_backgroundColor

HRESULT get_backgroundColor( 
    VARIANT *p 
);

Retrieves the value of the CSS background-color attribute for the element.

p
Address of a variable that receives the value of the attribute. See background-color for details. This parameter receives NULL if the attribute is not set.

See also put_backgroundColor

IHTMLStyle::get_backgroundImage

HRESULT get_backgroundImage(
    BSTR *p 
);

Retrieves the value of the CSS background-image attribute for the element.

p
Address of a variable that receives the value of the attribute. See background-image for details. This parameter receives NULL if the attribute is not set.

See also put_backgroundImage

IHTMLStyle::get_backgroundPosition

HRESULT get_backgroundPosition( 
    BSTR *p 
);

Retrieves the value of the CSS background-position attribute for the element.

p
Address of a variable that receives the value of the attribute. See background-image for details. This parameter receives NULL if the attribute is not set.

See also put_backgroundPosition

IHTMLStyle::get_backgroundPositionX

HRESULT get_backgroundPositionX(
    VARIANT *p 
);

Retrieves the x-coordinate of the CSS background-position attribute for the element.

p
Address of a variable that receives the x-coordinate. See background-image for details. This parameter receives NULL if the parameter is not set.

See also put_backgroundPositionX

IHTMLStyle::get_backgroundPositionY

HRESULT get_backgroundPositionY( 
    VARIANT *p 
);

Retrieves the y-coordinate of the CSS background-position attribute for the element.

p
Address of a variable that receives the y-coordinate. See background-image for details. This parameter receives NULL if the attribute is not set.

See also put_backgroundPositionY

IHTMLStyle::get_backgroundRepeat

HRESULT get_backgroundRepeat(
    BSTR *p 
);

Retrieves the value of the CSS background-repeat attribute for the element.

p
Address of a variable that receives the value of the attribute, which can be one of these strings:
norepeat Do not repeat.
repeaty Repeat vertically.
repeat Repeat both horizontally and vertically.
repeatx Repeat horizontally.
See background-image for details. This parameter receives NULL if the attribute is not set.

See also put_backgroundRepeat

IHTMLStyle::get_border

HRESULT get_border( 
    BSTR *p 
);

Retrieves the value of the CSS border attribute for the element.

p
Address of a variable that receives values that describe the border. See border for details. This parameter receives NULL if the attribute is not set.

See also put_border

IHTMLStyle::get_borderBottom

HRESULT get_borderBottom( 
    BSTR *p 
);

Retrieves the value of the CSS border-bottom attribute for the element.

p
Address of a variable that receives values that describe the bottom border. See border-bottom for details. This parameter receives NULL if the attribute is not set.

See also put_borderBottom

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.