Border CSS for Tables

I was reacquainted this week with a couple of CSS attributes for the HTML table.

table{border-collapse: collapse; border-spacing: 0px 0px;}

border-collapse has three attributes:

  • collapse – Borders collapse into a single border. border-spacing and empty-cells properties will be ignored
  • separate – Default, Borders detached, border-spacing and empty-cells properties will not be ignored.
  • inherit – property inherited from the parent element

border-spacing – horizontal and vertical distance between the borders of adjacent cells. ignored if table tag attribute cellspacing is used. negative values not allowed.

Cup size   
Select size then click on coffee cup.
This entry was posted in Code, CSS, Snippets. Bookmark the permalink.