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
troy beckett
12,035 PointsDrop down menu
Hi I'm pretty proficient now in all the simple things in css and html however I now want to learn more advanced things.
What I really want to master at the moment is drop down menus. They will be on pretty much every site I make so I would really like to get good a them.
Does anyone have any idea on where I should look to learn more about drop down menus or is it trial and error.
3 Answers
pietro capriata
18,066 Pointssimple... <ul><li>first element </li> <li>second element </li> <li>third element <ul><li>first subelement</li></ul></li>
li ul { display:none;} li ul:hover { display:block;}
Robert Richey
Courses Plus Student 16,352 PointsThis works when hover is on the li, not on the ul (there is no ul to hover because it is not being displayed).
li ul { display: none; }
li:hover > ul { display: block; }
pietro capriata
18,066 PointsOh sorry I have done a mistake ;-)
Guil Hernandez
Treehouse TeacherHi troy beckett,
The 2nd half of this tips video shows you how to build an HTML/CSS dropdown menu. :)
troy beckett
12,035 PointsI just want to say I think its great that people that actually run the website and are experts in the field take the time to read my posts and comment. I really appreciate it.
Robert Richey
Courses Plus Student 16,352 PointsRobert Richey
Courses Plus Student 16,352 PointsThis was a useful tutorial. It doesn't show you the body styles, so I created my own.