I have a table with class 'table-hover'. The default hover over color is a white / light grey. How do I change this color?
I've tried overwriting the default by adding the following to my dominant style sheet
.table-hover tbody tr:hover > th {
background-color: #D1D119;
}
Unfortunately, the above does not work
. table-hover tbody tr:hover td { background-color: Blue; }
You can use CSS without any javascript to make the row of a table highlight on hover. All it requires is that the use the pseudo class :hover to add the effect to whatever html element you choose.
BootstrapWeb DevelopmentCSS Framework. Using the . table-hover class, a light gray background will be added to rows while the cursor hovers over them.
Give this a try:
.table-hover tbody tr:hover td, .table-hover tbody tr:hover th {
background-color: #color;
}
This was the most simple way to do it imo and it worked for me.
.table-hover tbody tr:hover td {
background: aqua;
}
Not sure why you would want to change the heading color to the same hover color as the rows but if you do then you can use the above solutions. If you just want t
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