Search within TutorialsPark

CSS border-spacing Property

To Specify the spacing between table cell borders

Definition and Notes.

1. The CSS border-spacing property is used to set the space between adjacent cells in a table.It replaces the <table> element's cellspacing attribute

2. Its used with tables with border-collapse property set as seperate only, otherwise it gets ignored .

3. The first of the two length values specifies the horizontal seperation and the second specifies the vertical seperation


CSS border-spacing property. internetexplorer safari firefox opera chrome

View in Splitscreen»


Note- Although the property is applicable only to tables, its inherited by all the elements within the table

Property Values

Value Description
length To set the length using values in px, pt, cm, em. Negative Values are not allowed.
inherit The element takes the computed value of its parent element's border-spacing property.


Specs Value
Name border-spacing
Value <length> <length>
Initial Value 0
Applies to Elements with a display value of table or inline-table
Javascript syntax" 20px "
Inherited Yes
Computed Value Two Absolute Lengths
Browser Support internetexplorer safari firefox opera chrome

Related Examples.