Set the space between cells in a table:
The borderSpacing property sets or returns the space between cells in a table.
Note: This property has no effect if borderCollapse is set to collapse.
The borderSpacing property is supported in all major browsers.
Note: The borderSpacing property is not supported in IE7 and earlier. IE8 requires a !DOCTYPE. IE9 supports it.
Return the borderSpacing property:
Set the borderSpacing property:
Value | Description |
---|---|
length length | Specifies the space between cells in length units. Negative values are not allowed. Default value is 0.
|
initial | Sets this property to its default value. Read about initial |
inherit | Inherits this property from its parent element. Read about inherit |
Default Value: | 0 |
---|---|
Return Value: | A String, representing the space between cells in a table |
CSS Version | CSS2 |
Return the space between cells in a table:
CSS tutorial: CSS Table
CSS reference: border-spacing property