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.
CSS |
{ border-collapse : separate | collapse } |
Script |
table.style.borderCollapse = sCollapse ] |
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.
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
TABLE
border