+ 1

CSS hover not working.

When I hover the span element, the h1 element should become visible. Except it's not. Please help, getting a headache. https://code.sololearn.com/WPaS8tWsTnIK/?ref=app

22nd Mar 2020, 7:09 AM
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE)
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE) - avatar
3 Answers
+ 3
Sequence <span> before <h1> if you are using span:hover + h1 https://code.sololearn.com/WlHeehNzM5t9/?ref=app Adjacent sibling combinator The + combinator selects adjacent siblings. This means that the second element directly follows the first, and both share the same parent. Syntax: A + B Example: h2 + p will match all <p> elements that directly follow an <h2>. https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Selectors
22nd Mar 2020, 7:18 AM
Gordon
Gordon - avatar
+ 4
šŸ˜‚ You can search in Google with "mdn CSS + Selector"
22nd Mar 2020, 9:05 AM
Gordon
Gordon - avatar
+ 2
Gordon , what would we do without you?
22nd Mar 2020, 8:43 AM
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE)
Nor'wester šŸŒŖļø šŸ‡§šŸ‡© (INACTIVE) - avatar