Nested drop down
-
Is it possible to create a nested dropdown menu ? I've tested out all of the common BS ones, and they do not seem to work?
Am running 3.2.0For example, this works fine
<ul class="dropdown-menu dropdown-menu-end account-sub-links" style=""> <li><a class="dropdown-item rounded-1" href="/about">About</a></li> <li><a class="dropdown-item rounded-1" href="/contact">Contact</a></li> <li><a class="dropdown-item rounded-1" href="/donate">Donate</a></li> <li><a class="dropdown-item rounded-1" href="/faq">FAQ</a></li> <li><a class="dropdown-item rounded-1" href="/journey">Founder's Journey</a></li> <li><a class="dropdown-item rounded-1" href="/policies">Policies</a></li> <li><a class="dropdown-item rounded-1" href="/reviews">Reviews</a></li> <li><a class="dropdown-item rounded-1" href="/services">Services</a></li> </ul>
PS - looks like a bug in markdown for three backtick code ?
Found it - it's CSS
.markdown-highlight .hljs { display: table; }
Should be
.markdown-highlight .hljs { display: block; }
Comes out like this (but line numbers missing)
-
I don't think bootstrap supports nested dropdowns out of the box.
I changed the display to table-cell, using block causes issues when the code block is long and the scroll bar appears at the bottom of the container element, no idea why table-cell works
-
@baris said in Nested drop down:
I don't think bootstrap supports nested dropdowns out of the box.
I found this
https://jsfiddle.net/dallaslu/mvk4uhzL/
Will experiment...
-
@phenomlab like @baris mentioned earlier, I think the Bootstrap devs decided to not allow nested drop downs out of principle.
The idea behind it is to be opinionated on this issue because it forces you to think about whether you actually do need all the menu items you want to put in. The more complicated the structure the less easily someone can parse it sight unseen.
So at least here we're deferring to that opinion but admins are free to implement it if they wish.