CSS border-spacing property

CSS border-spacing

CSS border-spacing property is used in table, when it is border-collapse property is separate. It is used to set the distance between the adjacent cells border.

Two types of declaration in border-spacing

  • Using single value, it denotes both the horizontal and vertical distance between the cells.
  • Using two values, the first one denotes the horizontal spacing, while the second one denotes the vertical spacing.

Example 1 - Using single value

Try Yourself

Example 2 - Using two values

Try Yourself