0

i used twitter bootstrap for responsive websites. Its great tool. I have a problem on current websites. I need three level dropdown menu so like main nav -> sub item -> sub item.

similar to http://www.bestbuy.com/ when u hover on product. Is that possible on twitter bootstrap

Thanks

Andrew
  • 1,963
  • 3
  • 25
  • 35
Mitrovic Srdjan
  • 149
  • 3
  • 15

2 Answers2

0

Yes it's possible. Using the example on the bootstrap site as a basis, add a submenu to the existing submenu.

Like this:

<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu">
    <li><a tabindex="-1" href="#">Action</a></li>
    <li><a tabindex="-1" href="#">Another action</a></li>
    <li><a tabindex="-1" href="#">Something else here</a></li>
    <li class="divider"></li>
    <li class="dropdown-submenu">
        <a tabindex="-1" href="#">More options</a>
        <ul class="dropdown-menu">
            <li><a tabindex="-1" href="#">Second level link</a></li>
            <li><a tabindex="-1" href="#">Second level link</a></li>
            <li><a tabindex="-1" href="#">Second level link</a></li>
            <li><a tabindex="-1" href="#">Second level link</a></li>
            <li><a tabindex="-1" href="#">Second level link</a></li>
            <li class="dropdown-submenu">
                <a tabindex="-1" href="#">Even More options</a>
                <ul class="dropdown-menu">
                    <li><a tabindex="-1" href="#">Third level link</a></li>
                    <li><a tabindex="-1" href="#">Third level link</a></li>
                    <li><a tabindex="-1" href="#">Third level link</a></li>
                    <li><a tabindex="-1" href="#">Third level link</a></li>
                    <li><a tabindex="-1" href="#">Third level link</a></li>
                </ul>
            </li>
        </ul>
    </li>
</ul>
Matt Cain
  • 5,638
  • 3
  • 36
  • 45
0

use the class="dropdown-menu sub-menu" to do this. any level of nesting is possible. sample fiddle

credits: answer by Andres Ilich

Community
  • 1
  • 1
scarecrow
  • 6,624
  • 5
  • 20
  • 39