Updated Answer
* Updated answer that supports the stylesheet version version v2.1.1 ** bootstrap.
** But be careful because this solution has been removed from v3
I just want to note that this solution is no longer required, since the last boot file now supports multi-level drop-down lists by default. You can still use it if you are in earlier versions, but for those who have upgraded to the latest version (v2.1.1 at the time of writing), it is no longer needed. Here is the fiddle with the updated default multi-level drop-down list directly from the documentation:
http://jsfiddle.net/2Smgv/2858/
Original answer
Some issues related to supporting submenus in github have been raised, and they are usually closed by bootstrap developers such as this , so I think developers using a boot block need to do something. Here is a demo that I put together, showing you how you can crack a working submenu.
Corresponding code
CSS
.dropdown-menu .sub-menu { left: 100%; position: absolute; top: 0; visibility: hidden; margin-top: -1px; } .dropdown-menu li:hover .sub-menu { visibility: visible; display: block; } .navbar .sub-menu:before { border-bottom: 7px solid transparent; border-left: none; border-right: 7px solid rgba(0, 0, 0, 0.2); border-top: 7px solid transparent; left: -7px; top: 10px; } .navbar .sub-menu:after { border-top: 6px solid transparent; border-left: none; border-right: 6px solid #fff; border-bottom: 6px solid transparent; left: 10px; top: 11px; left: -6px; }
Created my own .sub-menu class for applying to drop-down menus with two levels, so we can place them next to our menu items. Also change the arrow to display it to the left of the submenu group.
Demo
Andres Ilich Mar 19 '12 at 15:54 2012-03-19 15:54
source share