After searching for a solution, I came across this query. However, it did not provide the answer I was looking for. It suggested setting fixed backgrounds on specific rows, but this could potentially disrupt the style if, for example, a bg-gradient
is set on the parent element.
The solutions proposed, either
tr.exclude:hover > td {background-color: rgba(0,0,0,0);}
or tr.exclude:hover {background-color: rgba(0,0,0,0);}
, seem to add another background color over the hover effect rather than replacing it. This results in the new color showing up if the alpha is not 0
, while the hover effect remains even when alpha is 0
.
According to Bootstrap's Table documentation, ".table-hover
enables a hover state on table rows within a <tbody>
". However, it seems that the hover state applies to <tr>
elements outside of the <tbody>
.
Is there a practical solution to simply disable the hover effect on specific rows in a Bootstrap table with hover functionality?