element1:hover + element2 {} | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

element1:hover + element2 {}

Typing the exact same syntax for a div and span elements worked in one code but not another despite being completely identical--names and all. Is there anything else that can cause this to not work? I'm flabbergasted here.

18th Jul 2016, 12:01 AM
Brian
1 Answer
+ 2
B + E /*Any E element that is the next sibling of B*/ Meaning: if DIV is the parent of B, E has to be the NEXT child of DIV.
19th Jul 2016, 3:44 PM
ZinC
ZinC - avatar