XML technologies / CSS / Advanced websites with CSS / CSS property reference / border-spacing

(Excerpt from “CSS − Advanced websites with Cascading Stylesheets” by Rachel Andrew & Dan Shafer)

The CSS property border-spacing corresponds to the attribute cellspacing of the HTML element table. It defines the spacing between two cells in a table. The property is ignored if the table’s property border-collapse is declared with collapse.

Inherited: yes

See also: border-collapse

Values

One or two CSS measurements, separated by a space. A single value describes cell spacing in both directions; with two values, the first describes horizontal spacing and the second vertical spacing.

Default value: 0

Compatibility

CSS version: 2

Supported only by Netscape 6 and Mozilla.

Example

The following rule creates a five-pixel gap between all cells in a table of the CSS class luftig:

table.luftig {
 border-spacing: 5px;
}

  

 

 

 

back to top