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?

CommentFileSizeAuthor
#5 3018064-3.patch3.86 KBmarkhalliwell
dropdown.Issue_.png3.44 KBtanasi
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tanasi created an issue. See original summary.

glynster’s picture

Yes this would be how you override the default.

In your less file do this:

#navbar .secondary > li .dropdown-menu {
.dropdown-menu-right;
}

tanasi’s picture

Great!

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!

tanasi’s picture

Status: Active » Fixed
markhalliwell’s picture

Title: Right Dropdown menu outside screen » Unable to easily add "dropdown-menu-right" to menus
Version: 7.x-2.x-dev » 8.x-3.x-dev
Category: Support request » Feature request
FileSize
3.86 KB

  • markcarver committed 7adbbd1 on 8.x-3.x
    Issue #3018064 by markcarver, tanasi, glynster: Unable to easily add "...
markhalliwell’s picture

Seeing 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.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.