-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening specific submenu on the left when the drop down is floated right and drop down opens on the left #5763
Comments
I believe my CSS changes from #5067 should fix the issue. Basically involved using left: auto;
right: 100%;
margin-left: 0;
margin-right: -1px; instead of left: -100%;
margin-left: 10px; Could you let me know if that's the fix you are looking for? |
I have changed in fiddle with your settings. All that it does is move the submenu a few pixles to left. I wanted the menu itself to be opened on the left as in the example given in bootstrap http://twitter.github.com/bootstrap/components.html. See Submenu option for left submenu Thanks |
Sorry - misunderstood your issue. The snippet of CSS your using is breaking it. Your using differing positioning, etc and your rules are overriding the ones Bootstrap has set. Why can't you just using |
If I just use pull-right and not making drop down to open on the left, menu list under master (see your version) still goes out of the window. That was the reason I made it to open to the left. Now since I have another drop down with a sub menu to the extreme right, I wanted this specific sub menu to open to the left. So by giving this choice to the developer to set the menu to open either to left or right based on the situation makes it more user friendly and developer friendly. Thanks, |
Okay - so it will take a little more work but if you add |
Did you just want |
That for me (your updated fiddle) is a temporary fix given the nature of the requirement is. But yes still I would like to have choice to open both drop down and specific sub menu to the left. |
No problem. Sorry if I came off rude at all. It really is up to the devs whether they implement this - I did experiment with an override earlier like this but it got messy quickly. If we override and Definitely easy enough to implement as long as it's documented with it's shortcomings. Hopefully there is a clean solution. |
Not a problem at all and it was not rude. You made your point. It might be a small change but I am not getting it at the moment :) and hope it would be a clean solution. I did try many options before raising this as an issue. |
Well What can I say. Found a solution of course with some direction from Blake :) Thanks Blake. Specifically the The example http://jsfiddle.net/girishmr/5AZAz/8/ explains itself better. I think I have got what I wanted with a few alterations to the markup. I will leave this open if there can be better solution provided. Thanks, |
@girishmr or @blakeembrey: Can one of you succinctly summarize what you're looking for here? I don't see any custom CSS in the fiddles that's changing default Bootstrap styles. Is there a bug or improvement to be had? |
@markdotto I think the main thing @girishmr is saying is that when we The only problem is that it could add confusion. E.g. .dropdown-submenu.pull-left,
.dropdown-submenu.pull-right {
float: none
}
/* This will target all children, but what about children of .dropdown-submenu.pull-right? */
.pull-right .dropdown-submenu > .dropdown-menu,
.dropdown-submenu.pull-left > .dropdown-menu {
left: auto
right: 100%
margin-left: 0
margin-right: -1px
}
/* Will need a pull-right override - should this be a normal selector to target all future .dropdown-menu? */
.dropdown-submenu.pull-right > .dropdown-menu {
left: 100%;
right: auto;
margin-left: -1px;
margin-right: 0;
} Not sure if this demonstrates it correctly? |
@markdotto The issue basically was to open only specific dropdown and sub menus on the left when the navs are pulled right The dropdowns opens to the right by default and in a scenario where we float the With some guidence form Blake I could manage to do this with base styles. By using When the navs as floated right, by using Hope this explains the issue. |
Punting this as we're removing submenus in 3.0. More info in the #6342 Bootstrap 3 pull request. |
Hi, is there a solution for Bootstrap 4 beta? |
@blakeembrey thanks I need help, your following code is working good. But it opening all submenu on left, I want based on screen size and space available, submenu should float left or right to display. left: auto; Please check https://chaitanyam.vishalkumar.com/ last Media menu submenu is not visible in events. |
Currently I am able to open the dropdown on the left when the nav is floated to right. The need is to open only specific submenu on the left as well
Bootstrap version 2.2.1 with
.dropdown-submenu pull-left
property on<li></li>
Please see the example in fiddle: http://jsfiddle.net/girishmr/5AZAz/
Note: I know there are a couple of issues opened on the submenus but since those are all closed and new version is released, I just opened up a new one
Thanks
Edit: Fixed your formatting, <3 @mdo.
The text was updated successfully, but these errors were encountered: