CSS border-spacing property
Example
Set the border spacing of a table:
table
{
border-collapse:
separate
;
border-spacing:
10
px
50
px
;
}
Try it »
Property definition and usage
The border-spacing property sets the distance between the borders of adjacent cells (only used in the "separated borders" model).
| Default value: | not specified |
|---|---|
| Inherited: | no |
| Version: | CSS2 |
| JavaScript syntax: | object object.style.borderSpacing="15px" |
Browser support





All major browsers support the border-spacing property.
NoteIE8 requires a DOCTYPE to be defined in order to support the border-spacing property.
Attribute values
| Value | Description |
|---|---|
| length length | Specifies the distance between the borders of adjacent cells. Use units such as px and cm. Negative values are not allowed.
|
Related Articles
CSS Tutorial: CSS Table