Easy Tutorial
❮ Pr Font Font Style Css Initial ❯

CSS border-collapse Property

Example

Set the table to use a collapsed border model:

table
{
    border-collapse:collapse;
}

Property Definition and Usage

The border-collapse property specifies whether the borders of the table are collapsed into a single border or separated as in standard HTML.

Default value: separate
Inherited: yes
--- ---
Version: CSS2
--- ---
JavaScript syntax: object.style.borderCollapse="collapse"
--- ---

Browser Support

All major browsers support the border-collapse property.

Note: Any version of Internet Explorer (including IE9) supports the property value "inherit".

Note: The border-collapse property may have unexpected effects if !DOCTYPE is not specified.


Property Values

Value Description
collapse Borders are collapsed into a single border if possible. The border-spacing and empty-cells properties are ignored.
separate Default value. Borders are separated. The border-spacing and empty-cells properties are not ignored.
inherit Specifies that the border-collapse property should be inherited from the parent element.

Related Articles

CSS Tutorial: CSS Table

❮ Pr Font Font Style Css Initial ❯