CSS Property border-collapse

The border-collapse property is employed to specify the border model of a table. It specifies whether or not the borders of the table and its table cells ought to be “joined” or separated.

When borders area unit separate, the table and every of its table cells will have their own distinct borders, and there’s area between them. you’ll management the quantity of area between borders of adjacent table cells victimization the border-spacing property.

When borders area unit “collapsed”, adjacent table cells share borders, and also the cells at the perimeters of the table share their borders with the borders of the table itself.

The width of the border are often explicitly set employing a price, or by using one in all 3 border dimension keywords: skinny, medium, and thick.

CSS Property border-collapse Value

  • separate
  • collapse
  • inherit

separate

Use the separated borders model. The table and its cells all have distinct borders.

collapse

Use the collapsed borders model. The table and table cells’ borders are joined and shared between them.

inherit

Inherits the same border model from its parent.

Desktop Browser Support

Mobile Browser Support

Examples

table {
    border-collapse: collapse;
}

table.stats {
    border-collapse: separate;
}

One comment

  1. I have been absent for some time, but now I remember why I used to love this web site. Thank you, I?¦ll try and check back more often. How frequently you update your web site?

Leave a Reply