I have a table and I want every cell to be highlighted when the mouse is over.
However, it is not working. It should be considered that I am using bootstrap
as the basis for page styles and therefore I believe it is a conflict between my css
and bootstrap
.
The table is defined as follows:
<table class="table table-bordered">
<tr>
<td align="center" class="info_table"><div onclick="invDir(0);" id="gpio0">-</div></td>
<td align="center" class="info_table"><div id="gpio1">-</div></td>
<td align="center" class="info_table"><div id="gpio2">-</div></td>
<td align="center" class="info_table"><div id="gpio3">-</div></td>
<td align="center" class="info_table"><div id="gpio4">-</div></td>
...
Set the info_table
class to highlight and prevent the value from being selected.
And this is css
of info_table
:
.info_table
{
width: 5%;
color: #d44637;
font-weight: bold;
cursor: pointer;
background-color: #fff;
-webkit-touch-callout: none;
-webkit-user-select: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}
.info_table : hover
{
background-color: #f1c40f;
}
The problem is that just hover
does not work.
NOTE: The content of div's
gpio * is loaded dynamically.