omega omega - 1 year ago 114
CSS Question

how to define multiple classes' hover event in css?

In css how can I define multiple class' hover events to use the same properties.
This doesn't seem to work:

.my_div:hover .my_td:hover {
border: 1px solid red;


Answer Source

You should separate with a comma, like this:

.my_div:hover, .my_td:hover {
    border: 1px solid red;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download