Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to highlight table row on hover using CSS only?

Tags:

html

css

Is it possible to highlight table row on hover (something like this) using CSS only (without JavaScript)?

like image 717
ceth Avatar asked Oct 24 '10 07:10

ceth


People also ask

How do you color a row in CSS?

How to color specific row in a CSS Table. You can use the tr:nth-child(rownumber) to color a particular row in a table using CSS. Above code select the 3 row from top (including table head row) and color background as green and foreground as white.


1 Answers

Yes, a row is possible but not a column.

tr:hover {   background-color: lightyellow; } 
like image 183
Emil Vikström Avatar answered Oct 04 '22 00:10

Emil Vikström