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

WordPress WordPress Theme Development Building Out WordPress Navigation The wp_nav_menu Function

How can i make a dropdown menu with bootstrap frame? e.g I need to put class into one of the li element.

<nav id="nav" class="l-nav align-left dropdown">
                        <li> <a href="/">Home</a> </li>
                        <li> <a id="dLabel" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true" href="/">Services <span class="caret"></span> </a>
                            <ul role="menu" aria-labelledby="dLabel" class="dropdown-menu">
                                <li> <a href="services/index" title="Domestic/residential">Domestic / residential</a> </li>
                                <li> <a href="services/soundproofing-walls" title="Soundproofing walls">Soundproofing walls</a> </li>
                                <li> <a href="services/soundproofing-floors" title="Soundproofing floors">Soundproofing floors</a> </li>
                                <li> <a href="services/soundproofing-ceilings" title="Soundproofing Ceilings">Soundproofing Ceilings</a> </li>
                                <li> <a href="services/clubs-pubs" title="Clubs &amp; Pubs">Clubs &amp; Pubs</a> </li>
                                <li> <a href="services/cinemas-recording-studios" title="Cinemas &amp; Recording Studios">Cinemas &amp; Recording Studios</a> </li>
                                <li> <a href="services/acousticfence–motorways-roads-sports-grounds-factories-industrial-estates" rel="Acoustic fence – motorways/roads/sports grounds/factories/industrial estates">Acoustic fence – motorways / roads / sports grounds / factories / industrial estates</a> </li>
                        <li> <a href="gallery">Gallery</a> </li>
                        <li> <a href="testimonials">Testimonials</a> </li>
                        <li> <a href="contact.php">Contact Us</a> </li>

3 Answers

Kevin Korte
Kevin Korte
28,148 Points

I'm not sure I totally understand. Do you want your dropdown list items to have other another dropdown. Basically nested list within a nested list?

That's correct @Kevin Korte.

Kevin Korte
Kevin Korte
28,148 Points

Well with bootstrap 3 sub menus for dropdowns are removed, but you might find this stack overflow thread helpful