Row of a row or column, not a cell on crash: split

I have a table, which for other reasons, I prefer to keep table collapse: separate. However, I would like to highlight individual rows or columns. Unfortunately, it seems that any style applied to <tr>or tags <col>applies only to cells, not to the space between them. For example:

<style>
  td { width: 10px; height: 10px; }
</style>
<table style="background-color: purple">
  <colgroup>
    <col span="2">
    <col style="background-color: red;">
    <col span="2">
  <colgroup>
  <tr><td><td><td><td><td></tr>
  <tr><td><td><td><td><td></tr>
  <tr style="background-color: orange;"><td><td><td><td><td></tr>
  <tr><td><td><td><td><td></tr>
  <tr><td><td><td><td><td></tr>
</table>

leads to a purple table with 5 vertical cells and 5 horizontal cells filled with color, but not the entire row or column.

Do I have an option besides using border-collapse: collapse to fill this space between cells in a given row or column?

+5
source share
3

, colspan, - , .

+1

border-collapse: separate, W3C :

, "border-collapse: separate", , "border-spacing", . . .

[ ] , , , . , , (.. ).

CSS:

+4

table-collapse: separate , . , CSS.

0

All Articles