Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialDominick L
8,516 PointsHow do I target the parent menu element for styling when the user is hovering over the sub-menu?
Hello, here's my live WP install... http://s485206817.onlinehome.us/a_jackson/
If you hover over the "About Us" and "Practice Areas" parent menu items, you will see they each contain a sub menu.
but then when a user hovers over one of the sub menu items, the Parent Menu items revert back to their "un-hovered over" style.
How do I target those parent menu items in CSS to keep them within the hover pseudo-class, when user is hovering over sub menu?
1 Answer
Stanley Thijssen
22,831 PointsHey Dominick,
If you use the :hover on the li items instead of the anchor elements it should work:)
Dominick L
8,516 PointsDominick L
8,516 PointsThat worked!! Thank you.