I show a table, which shall represent the fretboard of a guitar.
When the class "selected" is applied, a yellow dot is printed on the cell. When the cell is hovered over, the text of the cell becomes visible (=change of color) If both classes are applied, the dot covers the text. I would like to see the text over the dot. How can this be done?
Here is my sample code:
table {
background: black;
}
td {
position: relative;
width: 40;
text-align: center;
}
td.selected::before {
content: '';
position: absolute;
left: 50%;
top: 15%;
background: yellow;
width: 16px;
height: 16px;
border-radius: 50%;
z-index: 1;
}
td.show {
color: red;
}
<table>
<tr>
<td class="show selected">A</td>
</tr>
</table>