Export (0) Print
Expand All
top
Expand Minimize
This topic has not yet been rated - Rate this topic

border property

Specifies the properties of a border drawn around an object.

CSS Backgrounds and Borders Module Level 3, Section 4.4

Syntax

Integer value = object.put_border(BSTR v);Integer value = object.get_border(BSTR* sBorder);

Property values

Type: BSTR

one or more of the space-delimited values listed in Possible Values.

width (medium)

Any of the range of width values available to the IHTMLCSSStyleDeclaration::borderWidth property.

style (none)

Any of the range of style values available to the IHTMLCSSStyleDeclaration::borderStyle property.

color

Any of the range of color values available to the IHTMLCSSStyleDeclaration::borderColor property.

String format

<border-width> || <border-style> || <border-color>

CSS information

Applies ToAll elements
Mediavisual
Inheritedno
Initial Value(see individual properties)

Standards information

Remarks

The IHTMLCSSStyleDeclaration::border property is a composite property that sets the width, style, and color values for all four sides of an object. Unlike the shorthand IHTMLCSSStyleDeclaration::margin and IHTMLCSSStyleDeclaration::padding properties, the IHTMLCSSStyleDeclaration::border property can't set different values on the four borders. To do that, one or more of the other border properties (that is, IHTMLCSSStyleDeclaration::borderBottom, IHTMLCSSStyleDeclaration::borderLeft, and so on) must be used.

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 "medium".

The declaration "border: thin" is identical to "border: thin none"; the default value for the border color is the same as the text color if one is not initially set. Therefore, not only does this declaration set width to "thin", it also clears any style or color values previously set.

Setting a border to 0 or omitting the IHTMLCSSStyleDeclaration::border property causes no border to be displayed. Supplying the IHTMLCSSStyleDeclaration::border property 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.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

CSS Enhancements in Internet Explorer 6

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.