The border-spacing property specifies the distance between the borders of adjacent cells.

  • Initial value0
  • Applies to'table' and 'inline-table' elements*
  • InheritedYes
  • MediaVisual
  • Computed valueTwo absolute lengths
  • AnimatableNo
  • CSS VersionCSS2, CSS3
  • JavaScript syntaxobject.style.borderSpacing
Formal syntax: <length> <length>? | inherit

border-spacing: 10px;
border-spacing: 10px 5px;
  • <length>The distance that separates adjoining cell borders. If one length is specified, it gives both the horizontal and vertical spacing. If two are specified, the first gives the horizontal spacing and the second the vertical spacing. Lengths may not be negative.
.class {
   border-spacing: 3px; 
}
1+Firefox8+Explorer1+Chrome1.2+Safari8+Opera


Last updated on 26th March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.