本文档基于 CC协议(Creative Commons Share-Alike License)发布,是developer.mozilla.com, www.mozref.comwww.aptana.com共同劳动的成果。

border-collapse

Specifies whether the borders for an element are collapsed or separated.

Browser/User Agent Support

IENetscapeMozillaOperaSafari
5.0+6.0+1.0+5.0+1.2+
  • IE: In IE 5, 6, and 7, border-collapse: collapse does not overrule cellspacing.

Usage

[collapse-style-value]

Values

inheritInherit the value from the parent element.
collapseNo spacing between borders.
separateSpacing between borders.

Example

For a demonstration of the border-collapse attribute, see the demo page on quirksmode:

http://www.quirksmode.org/css/tables.html#bordercollapse

Availability

W3C CSS2

Related