How to create a drop-down list with submenu

0

Good day, I'm trying to create a drop-down list with submenu's inside at the time of doing and running it does not let me do it, it does not show me, I'm doing it with boostrap 3.3.7 that comes in mvc 5 of VB, it could help me how to do it

this is part of my code:

 <li class="dropdown">
                        <a href="#" data-toggle="dropdown">Test<b class="caret"></b></a>
                        <ul class="dropdown-menu dropdown-menu-right" >
                            <li class="dropdown dropdown-menu-right" data-toggle="dropdown"><a>Test1<b class="caret"></b></a>
                            <ul class="dropdown-menu-right dropdown-toggle" data-toggle="dropdown">
                                <li class="dropdown">Test1_1</li>
                            </ul>
                            </li>
                            <li><a>Test2<b class="caret"></b></a></li>
                        </ul>
                    </li>
    
asked by andres martinez 23.10.2018 в 00:51
source

1 answer

3

Submenus are not available in Bootstrap version 3, but you can add them to CSS

.navbar-nav li:hover > ul.dropdown-menu {
    display: block;
}
.dropdown-submenu {
    position:relative;
}
.dropdown-submenu>.dropdown-menu {
    top:0;
    left:100%;
    margin-top:-6px;
}

You can see the use of different sub levels in this example

    
answered by 23.10.2018 / 16:49
source