I want to change the style of menu items in the Bootstrap 3 nav menu when the menu is in folded mode.
For instance:
<div class="navbar navbar-inverse" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <a class="navbar-brand" href="#">Project name</a> </div> <div class="collapse navbar-collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">Home</a></li> <li><a href="#about">About</a></li> <li><a href="#contact">Contact</a></li> </ul> </div> </div> </div>
Is there a way to access the style properties of the "li> a" elements in the menu when these are different reacting states?
Thanks.
Edit: Another clarity ... Therefore, if you reduce the width of the screen and make the mobile menu appear, the menu items (navigation buttons) have the same style. Let's say I wanted to have buttons with a standard background (black here) in normal mode, but give them a green background in the mobile view, how do I do this?
source share