Maybe I'm overlooking something here, but I can't figure out how to color the top-borders of the td-elements.
table {
border-collapse:collapse;
}
td {
border: 2px solid #000;
}
tr:hover td {
border-color: #F55;
}
It works as expected, except the top border isn't colored.
http://jsfiddle.net/45CSj/
Because you are using instead use border-collapse: collapse;
border-collapse: separate;
with border-spacing
set to 0
table {
border-collapse: separate;
border-spacing: 0;
}
Demo
This might be useful-
table{border-collapse: separate; border-spacing: 0px}
table td{border: 1px solid #000;}
tr:hover td {border: 1px solid #F55; }
but this will show double border around the cells/rows.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With