Dropdown inside collapsable fails the first time because height is not auto #6019

disposable-ksa98 opened this Issue Nov 27, 2012 · 2 comments


None yet
2 participants

I have a dropdown inside a nav-collapse, and this is happening:

  • Load the page in width < 900px
  • Click on btn-navbar to un-collapse
  • Click on dropdown to show the dropdown-menu. Nothing happens.
  • Click twice on btn-navbar to collapse and un-collapse again.
  • Click on dropdown to show the dropdown-menu. Now it works.

Inspecting it with firebug I found that the height is fixed the first time, the second time is auto:


<!DOCTYPE html>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
        <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap.css" />
        <link rel="stylesheet" type="text/css" media="screen" href="css/bootstrap-responsive.css" />
        <script src="js/jquery.js"></script>
        <script src="js/bootstrap.js"></script>
        <div class="navbar">
            <div class="navbar-inner">
                <div class="container">

                    <!-- .btn-navbar is used as the toggle for collapsed navbar content -->
                    <button class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>
                        <span class="icon-bar"></span>

                    <!-- Be sure to leave the brand out there if you want it shown -->
                    <a class="brand" href="#">Project name</a>

                    <!-- Everything you want hidden at 940px or less, place within here -->
                    <div class="nav-collapse">
                        <ul class="nav pull-right">
                            <li class="dropdown">
                                <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                                Anonymous <b class="caret"></b>
                                <ul class="dropdown-menu">
                                        <a href=''><i class='icon-chevron-right'></i> Login</a>
                                        <a href=''><i class='icon-plus'></i> Register</a>


mfansler commented Nov 27, 2012

Duplicate of Issue #5890 and Issue #5671. The resolution is to change

<div class="nav-collapse">


<div class="nav-collapse collapse">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment