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

General Discussion

Sarunas Savolskis
Sarunas Savolskis
16,893 Points

Jquery drop down menu

HI! How to make correct drop down menu? When I add my code, sub-menu become mashed in header. HTML: <div class="header"> <img src="images/logo-01.png"> <ul class="menu"> <li>Nariai</li> <li>Foto</li> <li>Video</li> <ul id="ipatybes">ฤฎpatybฤ—s <li>Klausk ekstrasenso</li> <li>Renginiai</li> <li>Kasdienybฤ—</li> </ul> </ul> </div>

CSS: .menu { display: flex; flex-wrap: wrap; list-style: none; font-size: 21px; font-family: Myriad Pro; color: #1071b9; margin-right: 50px; }

.menu li { margin-left: 50px; }

ipatybes li {

position: absolute;
display: flex;
flex-wrap: wrap;
margin-left: auto;
flex-direction: column;
list-style: none;

}

ipatybes {

position: relative;

}

JS: $('#ipatybes li').hide(); $('#ipatybes').mouseover(function() { $('#ipatybes li').fadeIn(); }); $('#ipatybes').mouseleave(function() { $('#ipatybes li').fadeOut(); });