Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to make Angular.ui Bootstrap Dropdown drop UP?

I'm using angular ui.bootstrap and I've had success creating a simple drop down menu, but when you put the menu at the bottom of the page, it goes off the page. Is there a way to make it open in the UP direction?

Thanks! -fotoflo

like image 341
fotoflo Avatar asked Dec 11 '22 02:12

fotoflo


1 Answers

you can use the dropup class with Angular UI Bootstrap like so:

 <div class="btn-group dropup" dropdown>
      <button type="button" class="btn btn-danger">Action</button>
      <button type="button" class="btn btn-danger dropdown-toggle" dropdown-toggle>
        <span class="caret"></span>
        <span class="sr-only">Split button!</span>
      </button>
      <ul class="dropdown-menu" role="menu">
        <li><a href="#">Action</a></li>
        <li><a href="#">Another action</a></li>
        <li><a href="#">Something else here</a></li>
        <li class="divider"></li>
        <li><a href="#">Separated link</a></li>
      </ul>
    </div>
like image 197
Jordan Avatar answered Dec 13 '22 17:12

Jordan