+ 1

How can I do this?

https://code.sololearn.com/WElqmRPGWrt1/?ref=app I want to make the cell change color when touched. How can I do this?

26th Sep 2017, 8:43 AM
B.D
B.D - avatar
6 odpowiedzi
+ 3
td:hover { background-color:yourcolor; }
26th Sep 2017, 9:26 AM
Rishita
Rishita - avatar
+ 2
Thanks
26th Sep 2017, 9:27 AM
B.D
B.D - avatar
+ 1
It doesn't work!
26th Sep 2017, 9:18 AM
B.D
B.D - avatar
0
The closest you'll get in css is: td :active { //css } If you want it to stay like that you'll need to look at JavaScript's onClick function
26th Sep 2017, 9:01 AM
Limitless
Limitless - avatar
0
It only works on PC, when you click on it. You'll maybe need to look at Javascript. I'm unsure on how one would do this, maybe someone else has an answer
26th Sep 2017, 9:22 AM
Limitless
Limitless - avatar