XML technologies / CSS / Advanced websites with CSS / CSS property reference / border-collapse
(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)
The property border-collapse selects one of two available ways to define table borders.
The usual system is the familiar “separate borders” model: each cell has its own border and is separated from neighbouring cells by spacing defined for the whole table. This model corresponds to the CSS value separate.
An alternative is the “collapsed borders” model: borders of adjacent cells are combined, creating borders around whole row and column groups. This model corresponds to the CSS value collapse.
Inherited: yes
See also: empty-cells
Values
collapse or separate.
Default value: separate (Note: The CSS2 specification gives the default value as collapse, but all browser versions use separate. The CSS Working Group has therefore proposed changing the default accordingly in future CSS specifications.)
Compatibility
CSS version: 2
Works in Internet Explorer for Windows 5 and later, Netscape 6 and Mozilla.
Example
The following rule renders all tables of the class daten using the collapsed-border model:
table.daten {
border-collapse: collapse;
}
Copyright © 2006 of the German translation, dpunkt.verlag GmbH
You may print the online version for your private use.
Otherwise, this chapter from “CSS − Anspruchsvolle Websites mit Cascading Stylesheets” is subject to the same conditions as the bound edition: the work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
dpunkt.verlag GmbH, Ringstraße 19, 69115 Heidelberg