2

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.

1 Answer 1

3

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.