The border-collapse attribute is used for table elements and can be used to set the two borders of the table to merge into a single border. All major browsers support the border-collapse attribute.
How to use the css border-collapse property?
The border-collapse property sets whether the table's borders are collapsed into a single border, or displayed separately as in standard HTML.
Syntax:
border-collapse: separate|collapse|inherit;
Attribute value:
● separate: default value. The borders will be separated. The border-spacing and empty-cells properties are not ignored.
●Collapse: If possible, the borders will be merged into a single border. The border-spacing and empty-cells properties are ignored.
● Inherit: Specifies that the value of the border-collapse attribute should be inherited from the parent element.
Note:All major browsers support the border-collapse attribute. The attribute value "inherit" is not supported in any version of Internet Explorer (including IE8). If !DOCTYPE is not specified, border-collapse may produce unexpected results.
css border-collapse property example
Rendering:
The above is the detailed content of How to use css border-collapse property. For more information, please follow other related articles on the PHP Chinese website!