CSS border-spacing property

Description

CSS border-spacing property represents the space between borders of table cells.

Syntax

border-spacing : +ve length

Property values

+ve lengthDefault

length value adds spacing between the borders of table cells. 0px represents both horizontal and vertical spacing.

border-spacing: 0px;

+ve length

one value determines both the horizontal and vertical spacing. There is 10px horizontal and vertical spacing.

border-spacing: 10px;

H-length V-length (+ve)

Two values determine horizontal and vertical spacing of table cells.

The following demo represents 10px horizontal spacing and 20px vertical spacing.

border-spacing: 10px 20px;

Applicable to

It applies to table element.

#CSS digger
Was this article helpful?

 
Score
Name Aggregate Degree
James 70% BCS
John 80% BIT
Chips 90% BSE
×

Ctrl+D