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 trial
Ann Marie Borrelli
3,753 PointsWhere and how do I find a section to review creating a dropdown menu with HTML and CSS
Is there a way to search for specific information?
Ann Marie Borrelli
3,753 PointsThanks Jamie, I'm creating a 3 level menu using CSS only. I have a top menu which when hovered over, the 2nd level menu appears. I am looking for a solution where the applicable 3rd submenu only displays when hovering over the specific 2nd menu <li>. Currently all the 3rd level <li> appear as well when hovering over the top menu. Any ideas for a solution. Thanks.
Iain Simmons
Treehouse Moderator 32,305 PointsCan you please show us the code you have now, and we can see what we can do?
CSS isn't really meant to handle complex user interactions, that's really what JavaScript is for... but it might be possible.
1 Answer
Ann Marie Borrelli
3,753 PointsThank you Iain for getting back to me. However, in the meantime I figured it out. I used parent > child in my hover codes (example below) and it works.
topnav .nav li:hover > a
Thanks again.
Iain Simmons
Treehouse Moderator 32,305 PointsI'd encourage you to share your code in this forum post so others can see what you did to achieve your desired result. Not just the selector you needed, but the rest of it too.
Only if you want to of course... :)
James MacDonald
Courses Plus Student 6,268 PointsJames MacDonald
Courses Plus Student 6,268 PointsIf there's nothing here I would try g00gling "CSS only dropdown" and see what comes up...
Good luck!
-Jamie