Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

borderCollapse property

Indicates whether the row and cell borders of a table are joined in a single border or detached as in standard HTML.

CSS 2.1, Section 17.6

 

Syntax

Integer value = object.put_borderCollapse(BSTR v);Integer value = object.get_borderCollapse(BSTR* sCollapse);

Property values

Type: BSTR

separate (separate)

Initial value. Borders are detached (standard HTML).

collapse (collapse)

Borders are collapsed, where adjacent, into a single border.

String format

collapse | separate | inherit

CSS information

Applies Totable and inline-table elements
Mediavisual
Inheritedtrue
Initial Valueseparate

Standards information

Examples

This example demonstrates how to use the IHTMLRuleStyle2::borderCollapse CSS property and the IHTMLRuleStyle2::borderCollapse scripting property to manipulate the border on a table.

Code example: http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/borderCollapse.htm


<table id="oID_1" style="border-collapse: collapse">
  <tr>
    <td>EST</td>
    <td>9:00 a.m.</td>
  </tr>
  <tr>
    <td>CST</td>
    <td>8:00 a.m.</td>
  </tr>
  <tr>
    <td>PST</td>
    <td>6:00 a.m.</td>
  </tr>
</table>
<p>
  <input type="button" onclick="oID_1.style.borderCollapse='separate'" value="separate">
  <input type="button" onclick="oID_1.style.borderCollapse='collapse'" value="collapse">

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

IHTMLRuleStyle::border

 

 

Community Additions

ADD
Show:
© 2015 Microsoft