pawel pawel - 5 months ago 23x
HTML Question

Twitter bootstrap dropdown goes outside the screen

I want to implement twitter bootstrap dropdown menu, here's my code:

<span class="dropdown">
<a href="#menu1" class="dropdown-toggle" data-toggle="dropdown" ><img class="left" src="/static/img/topmenu_preferences.png" /><b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="#">a</a></li>
<li><a href="#">b</a></li>
<li><a href="#">c</a></li>
<li class="divider"></li>
<li><a href="#">d</a></li>

Dropdown works good, my dropdown is placed next to right edge of the screen and when I click my dropdown-toggle, the list goes outside the screen. It looks like on the screen:

enter image description here

How can i fix it?


adding .pull-right to ul.dropdown-menu should do it