Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
I am using bootstrap with CDN and I have noticed that the right (secondary) nav menu creates a dropdown that is out of the screen. Steps to reproduct:
- Activate a fluid container
- Edit the User menu and add a new menu item e.g. Test
- Move "My account" and "Logout" as children of the "Test" item.
In order to fix that it seems that a "dropdown-menu-right" class is needed to be added to the "dropdown-menu" ul element.
Any ideas on how to fix that?
Comment | File | Size | Author |
---|---|---|---|
#5 | 3018064-3.patch | 3.86 KB | markhalliwell |
Comments
Comment #2
glynster CreditAttribution: glynster commentedYes this would be how you override the default.
In your less file do this:
#navbar .secondary > li .dropdown-menu {
.dropdown-menu-right;
}
Comment #3
tanasi CreditAttribution: tanasi commentedGreat!
I just figured out that I can do in my style.css
.navbar-nav.secondary > li > .dropdown-menu {
left:auto;
right:0;
}
and achieve the same.
Thanks for your help!
Comment #4
tanasi CreditAttribution: tanasi commentedComment #5
markhalliwellComment #7
markhalliwellSeeing how this is likely a quite common practice for menus on the right like the secondary (account) menu, I've gone ahead and added this to 8.x-3.x.
This isn't likely to make its way back to 7.x-3.x, so use CSS for that as you have.