asp.net.ph

Skip Navigation Links

border-collapse Attribute | borderCollapse Property

CSS Attributes Index   Box Attributes


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

Syntax


CSS { border-collapse : separate | collapse }
Script table.style.borderCollapse = sCollapse ]

Possible Values


separate The borders are detached ( standard HTML ).
collapse The borders are collapsed, where adjacent,into a single border.

The property is read/write with a default value of separate; the CSS attribute is not inherited.

Example

The following example demonstrates the use of both the CSS border-collapse style attribute and the borderCollapse 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 VALUE="separate"
  onclick="oTable.style.borderCollapse='separate'" >
<INPUT TYPE=button VALUE="collapse"
  onclick="oTable.style.borderCollapse='collapse'" >

This feature requires Microsoft® Internet Explorer® 5 or later.

 Show me 

Applies To

TABLE

See Also

border



© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note