Easy Tutorial
❮ Css3 Pr Animation Duration Func Repeat ❯

CSS border-spacing Property

Example

Set the border spacing for a table:

table
{
    border-collapse: separate;
    border-spacing: 10px 50px;
}

Property Definition and Usage

The border-spacing property sets the distance between the borders of adjacent cells (only used with "border-collapse: separate").

Default value: not specified
Inherited: yes
--- ---
Version: CSS2
--- ---
JavaScript syntax: object.style.borderSpacing="15px"
--- ---

Browser Support

All major browsers support the border-spacing property.

Note: IE8 requires a !DOCTYPE to be specified to support the border-spacing property.


Property Values

Value Description
length length Specifies the distance between the borders of adjacent cells. Uses units like px, cm, etc. Negative values are not allowed. If one length parameter is defined, it sets both the horizontal and vertical spacing. <br>If two length parameters are defined, the first sets the horizontal spacing and the second sets the vertical spacing.
inherit Specifies that the value of the border-spacing property should be inherited from the parent element

Related Articles

CSS Tutorial: CSS Table

❮ Css3 Pr Animation Duration Func Repeat ❯