Problems with selectors applying hover

0

I was developing a website that has a table and in it I am applying a hover that changes both the background and the letter.

The problem is that when I perform the hover with selectors in the execution, the next element of the table is passed (tr) and the first element is not taken.

I was checking if I have errors in the syntax but I'm sure I do not have them.

I checked some pages and I'm still crazy with what the browser is showing me.

I leave the link in codepen.io in case someone can help me:

Link CondePen.io

    
asked by DANNY ALEXANDER CELIS BAYONA 05.04.2018 в 14:10
source

1 answer

4

Estimated selector + works as follows:

div + p

the top selector what it does is take a p element that is immediately after a div element. Then in your css code:

.tabla tbody tr:hover + tr td

what you are selecting here is, by doing hover on a row (tr), you will select all the cells in the next row. I think what you want to achieve is the following

.tabla tbody tr:hover td
    
answered by 05.04.2018 / 14:15
source