Avatar of Chris Coyier
Chris Coyier on

Grow sales with Customer Journey Smarts with MailChimp Mailchimp tracking pixel

The border-spacing property in CSS controls how far apart cells are in a <table> element (or an element that is made to be table-like via display: table;).

It takes any of the lengths of CSS.

Notably, it only has any effect at all if the table is using the default border-collapse: separate; and has no effect at all when border-collapse: collapse; is set.

table {
  border-collapse: separate;

  border-spacing: 5px;
  border-spacing: 1vw;
  border-spacing: 2em;

See the Pen
Table with Rounded Cells
by Chris Coyier (@chriscoyier)
on CodePen.

Browser Support

Chrome Safari Firefox Opera IE Android iOS
Works Works Works Works Works Works Works