Reputation: 2253
How do I style a navbar in Bootstrap when it has been collapsed and then opened via the toggle button? It doesn't look like bootstrap adds a class to the navbar when the menus are collapsed into the button. It seems like there should a class that is present when the navbar is in expanded/collapsed mode.
Upvotes: 2
Views: 549
Reputation: 2253
Of course I found the answer right after I ask the question... When the hamburger button is pressed, bootstrap changes
<div id="main-menu" class="navbar-collapse collapse">
to
<div id="main-menu" class="navbar-collapse collapse in">
so,
.collapse.in ... {}
targets rules in the expanded state.
Upvotes: 3