style.borderCollapse (Property)

A switch that determines whether borders of adjacent elements are drawn independently of one another or shared between the two items.

Availability:

CSS level - 2
DOM level - 2
JavaScript - 1.5
JScript - 5.0
Internet Explorer - 5.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myStyle.borderCollapse
CSS syntax:border-collapse: aSwitch
Argument list:aSwitchA switching parameter value

Collapsing borders gives adjacent objects the same appearance as table cells. Cells in a table share common borders. The downside of this is that it is sometimes hard to see which object a border belongs to. You might turn off all the borders on an object that is surrounded by objects that have active borders. Then collapsing the borders for all the objects would look no different than if the middle object had its borders all active as well.

These keywords are appropriate for use with this property:

Warnings:

See also:style.borderSpacing