property
Border spacing — CSS reference
Sets the horizontal and optional vertical distances between adjacent cell borders in the separated-border model. A single length applies to both axes. The spacing also occurs at the table perimeter between cell borders and the table padding edge. It does not apply in collapsed mode.
Formal Syntax & Structure
css syntaxcss
border-spacing: 8px 6px;Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>border-spacing</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}body{font:16px/20px sans-serif;background:white}#a{padding:0;background:transparent;margin:10px;color:black}table{border-spacing:0}td,th{padding:0}caption{padding:0}#a{border-collapse:separate;border-spacing:8px 6px}td{width:60px;height:30px;border:2px solid red;background:white}</style><body><table id="a"><tr><td id="x">A</td><td id="y">B</td></tr><tr><td id="z">C</td><td>D</td></tr></table></body></html>