kirkmadrid
New Member
I'm trying to modify this "hover on anything but" code(http://csstricks.com/examples/HoverEverythingBut/) so that the link being hovered over will change colors or perhaps eventually be replaced by an image. I figured the best way to accomplish this was with the nth-child command and I have added the following CSS...\[code\] #all:hover ul li a:hover:nth-child(1) { background: #ffffff no-repeat; } #all:hover ul li a:hover:nth-child(2) { background: #000000 no-repeat; } #all:hover ul li a:hover:nth-child(3) { background: #bbbbbb no-repeat; } #all:hover ul li a:hover:nth-child(4) { background: #c73b1b no-repeat; } #all:hover ul li a:hover:nth-child(5) { background: #367db2 no-repeat; } #all:hover ul li a:hover:nth-child(6) { background: #111111 no-repeat; } #all:hover ul li a:hover:nth-child(7) { background: #222222 no-repeat; } #all:hover ul li a:hover:nth-child(8) { background: #333333 no-repeat; } #all:hover ul li a:hover:nth-child(9) { background: #444444 no-repeat; }\[/code\]Unfortunately, only the first nth-child command seems to be recognized. Now whenever I hover over a link (whether it be the first or last) the background will only turn white.Any help would be greatly appreciated! Thanks!