B.15. border-collapse

This property lets you choose which of two systems for defining table borders you want the browser to use.

The default system, which you can select with the value separate, is the familiar "separate borders" system, where each table cell has its own borders separated by the cell spacing of the table. The new system, which you can select with the collapse value, gets rid of any cell spacing, combines the borders of adjacent cells, and lets you assign borders to row and column groups. For full details, refer to the CSS2 specification.

Inherited: Yes

See also: Section B.34empty-cells

B.15.1. Value

collapse or separate

Initial value: separate[1]

[1] The initial value prescribed by the CSS2 specification is actually collapse; however, all current browsers' default table rendering corresponds to separate. The CSS Working Group has therefore proposed changing the default value of this property to separate in a future version of the CSS specification. This proposal may be found in the Errata for the CSS2 specification.

B.15.2. Compatibility

CSS Version: 2

Works in Internet Explorer 5 for Windows, Netscape 6, and Mozilla browsers.

B.15.3. Example

This style rule sets tables of class data to use the collapsed border model:

table.data {
  border-collapse: collapse;
}

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.238.70