borderStyle property
Specifies the style of the left, right, top, and bottom borders of the object.
![]() |
Syntax
Integer value = object.put_borderStyle(BSTR v);Integer value = object.get_borderStyle(BSTR* sStyle);
Property values
Type: BSTR
-
Default. No border is drawn, regardless of any specified IHTMLCurrentStyle::borderWidth.
-
Internet Explorer 8. Same as
none, except in terms of conflict resolution of collapsed borders. Any element with ahiddenborder suppresses all shared borders at that location. Borders with a style ofnonehave the lowest priority. -
Border is a dotted line. This value is supported on the Macintosh platform, as of Internet Explorer 4.01, and on the Windows platform, as of Internet Explorer 5.5. It renders as a solid line on UNIX platforms, and on Windows systems running earlier versions of Internet Explorer.
-
Border is a dashed line. This value is supported on the Macintosh platform as of Internet Explorer 4.01 and on the Windows platform, as of Internet Explorer 5.5. It renders as a solid line on UNIX platforms, and on Windows systems running earlier versions of Internet Explorer.
-
Border is a solid line.
-
Border is a double line drawn on top of the background of the object. The sum of the two single lines and the space between equals the IHTMLCurrentStyle::borderWidth value. The border width must be at least 3 pixels wide to draw a double border.
-
3-D groove is drawn in colors based on the value. The IHTMLCurrentStyle::borderWidth property of the object must be specified for the style to render correctly.
-
3-D ridge is drawn in colors based on the value.
-
3-D inset is drawn in colors based on the value.
-
Internet Explorer 6 and later. Border is the same as inset, but is surrounded by an additional single line, drawn in colors based on the value.
-
3-D outset is drawn in colors based on the value.
String format
none | hidden | dotted | dashed | solid | double | groove | ridge | inset | outset
{1,4}
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value | none |
Standards information
- CSS Backgrounds and Borders Module Level 3, Section 4.2
Remarks
Illustrations of the above values are shown in the image below.

Examples
The following example shows how to use IHTMLCurrentStyle::borderStyle to apply different border styles on the same div element.
<div id="multiple"> border-style: dotted dashed ridge double; </div>
In the CSS below, IHTMLCurrentStyle::borderStyle is set to dotted dashed ridge double. This sets the IHTMLCurrentStyle::borderTopStyle to dotted, IHTMLCurrentStyle::borderLeftStyle to dashed, IHTMLCurrentStyle::borderBottomStyle to ridge, and IHTMLCurrentStyle::borderRightStyle to double.

#multiple {
width: 250px;
background-color: #E6E6E6;
border-style: dotted dashed ridge double;
border-width: 6px;
border-color: #000080;
}
Requirements
|
Minimum supported client |
Windows XP |
|---|---|
|
Minimum supported server |
Windows Server 2003 |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
