I have a css class for td as follows:
td {
text-align: left;
padding: 3px;
color:white;
background-color:#E3F2ED ;
position:relative;
z-index:10;
border:1px solid #74827D;
border-style:solid none;
}
td:before{
content:"";
position:absolute;
z-index:-1;
top:2px;
left:2px;
right:2px;
bottom:2px;
background:#20936C;
}
This makes the individual cells with color #20936C
and a border of color #E3F2ED
and last border of color #74827D
.
Now I want to change the color of one cell when it is clicked. So basically I just want to change the :before
color to let's say red.