I created some spaces between 2 rows. When I hover over the tr element, I cannot assign a background color to the spaces I created with border-spacing.How can I set this?
table {
border-collapse: separate!important;
border-spacing: 0 5px!important;
}
tr:hover{
background-color: red;
}
2
Answers
You can’t apply a background color to space outside of an element. But simulating it via two box shadows should probably work for your scenario:
It is not possible with
border-spacing
. Another approach would be with padding: