I use the following code in CSS
.table>tbody>tr:nth-of-type(even) { background-color:#C6DDFF;}
to color table rows one white, next blue, next white...
But when I use JavaScript to insert a new <tr>
(which is needed temporary) the design screws up. Because the CSS sees the inserted <tr>
as next row, which is theoretically correct.
But want the new <tr>
in a own style, and the original table layout should be the same as in the first load.
Is there a way to tell CSS like "don't affect this row...ignore it?"