CSS border-spacingProperty
Example
Set the border spacing of the table:
table
{
border-collapse:separate;
border-spacing:10px 50px;
}
Try it Yourself »
Property definition and usage instructions
The border-spacing property sets the distance between the borders of adjacent cells (used only in the "border-separated" mode).
| 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 defining !DOCTYPE to support the border-spacing property.
Property value
| Value | Description |
|---|---|
| length length | Specifies the distance between the borders of adjacent cells. Use units such as px, cm. Negative values are not allowed.
|
| inherit | Specifies that the value of the border-spacing property should be inherited from the parent element. |
Related Articles
CSS Tutorial:CSS Table
other extensions