HomeReferencesCSS Properties

CSS Property: border-spacing

Specifies the spacing between the borders of adjacent table cells in the "separated borders" model. Not supported by IE.

HTML Dog, The Book HTML Dog book cover

HTML Dog is hosted by Titan Internet

Possible Values

  • [length]. border-spacing can have one value such as 5px to specify spacing on all sides or two values such as 5px 10px to specify the horizontal (first value) and vertical (second value) spacing.

Example


table {
	border-collapse: separate;
	border-spacing: 0.25em 0.5em;
}

td { border: 1px solid #ccc; }