Bootstrap drops down, doesn't work

I've tried putting pull-left on everything and everything I do the dropdown containing "Edit" and "Destroy" falls to the right and I get nasty scrollbars.

HAML version :

.btn-group
  %button{ :class => 'btn btn-mini dropdown-toggle', 'data-toggle' => 'dropdown' }
    %span.icon-cog
  %ul.dropdown-menu
    %li= link_to 'Edit', '#'
    %li= link_to 'Destroy', '#'

      

HTML version :

<div class='btn-group'>
  <button class='btn btn-mini dropdown-toggle' data-toggle='dropdown'>
    <span class='icon-cog'></span>
  </button>
  <ul class='dropdown-menu nav pull-left'>
    <li><a href="#">Edit</a></li>
    <li><a href="#">Destroy</a></li>
  </ul>
</div>

      

+3


source to share


3 answers


As of v3.1.0, pull-left is deprecated.

Use instead dropdown-menu-right



See here

+7


source


Use pull-right

instead pull-left

and the menu will be shown on the left.



+5


source


dropdown pull-left

doesn't work for dropdown-menu

but does work fordropdown-submenu

<li class="dropdown-submenu pull-left">
  <a href="#" >Branch</a>
      <ul class="dropdown-menu">
          <li><a href="#">Create Branch</a></li>
          <li><a href="#">Edit Branch</a></li>
          <li><a href="#">Set Branch Status</a></li>
      </ul>
</li>

      

demo

+4


source







All Articles