Export (0) Print
Expand All
top
Expand Minimize

border-collapse

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

Syntax

{ border-collapse: sCollapse }

Possible values

sCollapse

String that specifies or receives one of the following values:

separate

Default. Borders are detached (standard HTML).

collapse

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

This property has a default value of separate. It is not inherited.

Example

This example demonstrates how to use the border-collapse property to manipulate the border on a table:

<table id=oTable 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="oTable.style.border-collapse='separate'" 
   value ="separate">
<input type=button 
   onclick="oTable.style.border-collapse='collapse'" 
   value ="collapse">

Standards information

This property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) Ee371284.xtlink_newWindow(en-us,Expression.40).png.

Applies to

TABLE

See also

Concepts

border

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.

Community Additions

ADD
Show:
© 2014 Microsoft