TD background color causing borders to disappear

I just came upon this problem myself, but I didn’t like the solution presented here, so I kept googling. I found this answer: https://stackoverflow.com/a/16337203/1156476

Here, a simple addition to the table cell fixes the borders:

table td {
  border: 1px solid #000;
  border-collapse: collapse;
  margin: 0;
  padding: 4px;
  position: relative;
  background-clip: padding-box; /* Add this line */
}

Check browser support at Caniuse

And an explanation of the property can be found at Standardista

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)