Skip to content
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

Active dropdown in NavBar not highlighted #1777

Closed
arbme opened this issue Feb 6, 2012 · 4 comments
Closed

Active dropdown in NavBar not highlighted #1777

arbme opened this issue Feb 6, 2012 · 4 comments

Comments

@arbme
Copy link

arbme commented Feb 6, 2012

When you set a dropdown as active in the NavBar is doesn't take on the same effect as a normal link:

<div class="navbar">
    <div class="navbar-inner">
    <div class="container" style="width: auto;">
            <ul class="nav">
                <li class="active"><a href="#">Looks Good</a></li>
                <li class="dropdown active">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        Looks Wrong
                        <b class="caret"></b>
                    </a>
                    <ul class="dropdown-menu">
                        <li><a href="#">Link 1</a></li>
                        <li><a href="#">Link 2</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>
                         ...

Currently:

.navbar .nav .open > .dropdown-toggle, .navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle {
  background-color: transparent;

Change to:

.navbar .nav .active > .dropdown-toggle, .navbar .nav .open.active > .dropdown-toggle {
  background-color: rgba(0, 0, 0, 0.5);
@arbme arbme closed this as completed Feb 6, 2012
@arbme arbme reopened this Feb 6, 2012
@mdo
Copy link
Member

mdo commented Feb 13, 2012

Looks fine to me in 2.0.1-wip.

@komprehend
Copy link

i have the same problem

@TheEricMiller
Copy link

$('.active').closest('li.dropdown').addClass('active');

@zebtin
Copy link

zebtin commented Jun 26, 2014

Great recommendation by @TheEricMiller! The documentation does indicate to add the active class to the "top" item in the nav, but its not intuitive to think about it when you are deep in the context of a leaf.
Thanks!

@twbs twbs locked and limited conversation to collaborators Jun 29, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants