Sets or retrieves the properties to draw around the object.
HRESULT IHTMLRuleStyle::get_border(BSTR *p);HRESULT IHTMLRuleStyle::put_border(BSTR v);
- Pointer to a variable of type BSTR that receives one or more of the space-delimited values listed in Possible Values.
- BSTR that specifies one or more of the space-delimited values listed in Possible Values.
width Any of the range of width values available to the IHTMLStyle::borderWidth property. style Any of the range of style values available to the IHTMLStyle::borderStyle property. color Any of the range of color values available to the IHTMLStyle::borderColor property.
Returns S_OK if successful, or an error value otherwise.
The IHTMLRuleStyle::border property is a composite property that sets the width, style, and color values for all four sides of an object.
You must specify a style when specifying a width or color; otherwise, the border does not render.
All individual border properties not set by the composite border property are set to their default values. For example, the default value for width is
The setting IHTMLRuleStyle::border=
thinis identical to IHTMLRuleStyle::border=
none; the default value for the border color is the same as the text color if one is not initially set. So, not only does the property set width to
thin, it also clears any style or color values previously set.
Setting a border to zero or omitting the attribute causes no border to be displayed. Supplying the border attribute without a value defaults to a single border.
If a color is not specified, the text color is used.
For more information about supported colors, see the Color Table.
The IHTMLRuleStyle::border property also applies to input; however, it has no actual function in Windows Internet Explorer, and IHTMLRuleStyle::border has been deprecated in favor of the appropriate CSS markup (see Cascading Style Sheets (CSS)).
As of Microsoft Internet Explorer 5.5, this property applies to inline elements. With earlier versions of Internet Explorer, inline elements must have an
absoluteIHTMLStyle::position or layout to use this property. Element layout is set by providing a value for the IHTMLRuleStyle::height property or the IHTMLRuleStyle::width property.
CSS Enhancements in Internet Explorer 6