borderTop property
Specifies the properties of the top border of the object.
![]() |
Syntax
Integer value = object.put_borderTop(BSTR v);Integer value = object.get_borderTop(BSTR* sTop);
Property values
Type: BSTR
one or more of the space-delimited values listed in Possible Values.| Value | Meaning |
|---|---|
|
Any of the range of width values available to the IHTMLCSSStyleDeclaration::borderTopWidth property. |
|
Any of the range of style values available to the IHTMLCSSStyleDeclaration::borderTopStyle property. |
|
Any of the range of color values available to the IHTMLCSSStyleDeclaration::borderTopColor property. |
String format
<border-top-width>
||
<border-top-style>
||
<border-top-color>
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value | (see individual properties) |
Standards information
- CSS Backgrounds and Borders Module Level 3, Section 4.4
Remarks
The IHTMLCSSStyleDeclaration::borderTop property is a shorthand property that sets the width, color, and style values for the top border of an object.
All individual border properties not set by the shorthand IHTMLCSSStyleDeclaration::borderTop property are set to their initial values. For example, the initial value for width is "medium".
If a color is not specified, the text color is used.
For more information about supported colors, see the Color Table.
Examples
This example uses IHTMLCSSStyleDeclaration::borderTop to change IHTMLCSSStyleDeclaration::borderTopWidth, IHTMLCSSStyleDeclaration::borderTopStyle, and IHTMLCSSStyleDeclaration::borderTopColor for a div element.

<body> <div class="top"></div> </body>
div {
border: 2px solid black;
height: 50px;
width: 50px;
}
.top {
border-top: 2px dashed #00BFFF;
}
Requirements
|
Minimum supported client |
Windows XP |
|---|---|
|
Minimum supported server |
Windows Server 2003 |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
- Reference
- IHTMLCSSStyleDeclaration::border
- Other Resources
- CSS Enhancements in Internet Explorer 6
