Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to make twitter bootstrap submenu to open on the left side?

I was trying to create twitter bootstrap submenu in dropdown menu, but I've got a problem: I have dropdown menu in the top right corner of the page and that menu has one more submenu. However, when submenu opens - it does not fit in the window and goes too much to the right, so that user can see only first letters. How to make that submenu to open not to the right, but to the left?

like image 709
kovpack Avatar asked Aug 29 '12 22:08

kovpack


People also ask

Which class is used with drop down menu to open left of the button?

Example Explained dropdown class indicates a dropdown menu. To open the dropdown menu, use a button or a link with a class of . dropdown-toggle and the data-toggle="dropdown" attribute. The .


1 Answers

If I've understood this right, bootstrap provides a CSS class for just this case. Add 'pull-right' to the menu 'ul':

<ul class="dropdown-menu pull-right"> 

..and the end result is that the menu options appear right-aligned, in line with the button they drop down from.

like image 55
Matt Avatar answered Oct 07 '22 01:10

Matt