Search DaTutorials:  
HOME
DHTML Reference
Introduction
Reference

border-collapse Attribute | borderCollapse Property


Sets or retrieves 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

HTML { border-collapse : sCollapse }
Scriptingobject.style.borderCollapse [ = sCollapse ]

Possible Values

sCollapseString that specifies or receives one of the following values.
separateDefault. Borders are detached (standard HTML).
collapseBorders are collapsed, where adjacent, into a single border.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of separate. The Cascading Style Sheets (CSS) attribute is not inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see>About Dynamic Properties.

Example

This example demonstrates how to use the border-collapse 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 
   onclick="oTable.style.borderCollapse='separate'" 
   VALUE="separate">
<INPUT TYPE=button 
   onclick="oTable.style.borderCollapse='collapse'" 
   VALUE="collapse">
This feature requires Microsoft® Internet Explorer 5 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

Standards Information

property is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) Non-Microsoft link.

Applies To

currentStyle, runtimeStyle, style, TABLE

See Also

border

     Pacotes Reveillon Salvador | The eBay Song | Cheap Flights | Car Loan | Online Advertising
Home     Link To Us     Ad With Us     Contact Us     Tell A Friend     Affiliates     Blog     MsOfficeHelp