O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

border-spacing

Values:

<length> <length>?

Initial value:

0

Applies to:

Elements with a display value of table or inline-table

Inherited:

Yes

Computed value:

Two absolute lengths

Description:

Defines the distance between table cell borders in the separated borders table layout model. The first of the two length values is the horizontal separation and the second is the vertical. This property is only honored when border-collapse is set to separate; otherwise, it is ignored. Although the property applies only to tables, it is inherited by all of the elements within the table.

Examples:

table {border-collapse: separate; border-spacing: 0;}
table {border-collapse: separate; 
      border-spacing: 3px 5px;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required