B.17. border-spacing

This property is the CSS equivalent to the cellspacing attribute of the HTML <table> tag. It lets you specify the spacing that will appear between cells in a table. This property is ignored if border-collapse is set to collapse for the table.

Inherited: Yes

See also: Section B.15border-collapse

B.17.1. Value

A single CSS length measurement, or two lengths separated by a space. A single value will be applied as both the horizontal and vertical spacing between cells. Two values will be applied as horizontal and vertical spacing, respectively.

Initial value: 0

B.17.2. Compatibility

CSS Version: 2

Supported by Netscape 6 and Mozilla browsers only at this time.

B.17.3. Example

This style rule allows 5 pixels of spacing between ...

Get HTML Utopia: Designing Without Tables Using CSS now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.