border-spacing

Avatar of Chris Coyier
Chris Coyier on (Updated on )

📣 Freelancers, Developers, and Part-Time Agency Owners: Kickstart Your Own Digital Agency with UACADEMY Launch by UGURUS 📣

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;
}

Browser support

ChromeSafariFirefoxOperaIEAndroidiOS
AllAllAllAllAllAllAll