You can use Bootstrap's .row-fluid
to accomplish what you need.
I've inlined the css for the width of the dropdown menu but you can specify a class/id and include that in your stylesheet.
Basically, what's going on here is:
- We are creating a fluid grid inside of the dropdown
- Setting a fixed width for the dropdown container itself
- The
li
tags are inheriting their style from the parent dropdown
The example below was only tested in Chrome v23
* Boostrap 2.x:
<ul id="multicol-menu" class="nav pull-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">MultiCol Menu <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<div class="row-fluid" style="width: 400px;">
<ul class="unstyled span4">
<li><a href="#">test1-1</a></li>
<li><a href="#">test1-2</a></li>
<li><a href="#">test1-3</a></li>
</ul>
<ul class="unstyled span4">
<li><a href="#">test2-1</a></li>
<li><a href="#">test2-2</a></li>
<li><a href="#">test2-3</a></li>
</ul>
<ul class="unstyled span4">
<li><a href="#">test3-1</a></li>
<li><a href="#">test3-2</a></li>
<li><a href="#">test3-3</a></li>
</ul>
</div>
</li>
</ul>
</li>
</ul>
[EDIT]
* Boostrap 3.x:
<ul id="multicol-menu" class="nav pull-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">MultiCol Menu <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<div class="row" style="width: 400px;">
<ul class="list-unstyled col-md-4">
<li><a href="#">test1-1</a></li>
<li><a href="#">test1-2</a></li>
<li><a href="#">test1-3</a></li>
</ul>
<ul class="list-unstyled col-md-4">
<li><a href="#">test2-1</a></li>
<li><a href="#">test2-2</a></li>
<li><a href="#">test2-3</a></li>
</ul>
<ul class="list-unstyled col-md-4">
<li><a href="#">test3-1</a></li>
<li><a href="#">test3-2</a></li>
<li><a href="#">test3-3</a></li>
</ul>
</div>
</li>
</ul>
</li>
</ul>
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…