0
How can I change the color of the links present in the standard Bootstrap navbar? I can change the navbar backgroud colors by an external css file but not the link colors. How can I do?
Toggle navigation Brand
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav">
<li class="active"><a href="#">Link <span class="sr-only">(current)</span></a></li>
<li><a href="#">Link</a></li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Dropdown <span class="caret"></span></a>
<ul class="dropdown-menu" role="menu">
<li><a href="#">Action</a></li>
<li><a href="#">Another action</a></li>
<li><a href="#">Something else here</a></li>
<li class="divider"></li>
<li><a href="#">Separated link</a></li>
<li class="divider"></li>
<li><a href="#">One more separated link</a></li>
</ul>
</li>
</ul>
<form class="navbar-form navbar-left" role="search">
<div class="form-group">
<input class="form-control" placeholder="Search" type="text">
</div>
<button type="submit" class="btn btn-default">Submit</button>
</form>
<ul class="nav navbar-nav navbar-right">
<li><a href="#">Link</a></li>
</ul>
</div>
'
I updated the example. Check if you can make it work now.
– Fernando - NextBilling
Two questions: 1 - Pq can only apply the change by passing the full element path (
.navbar-nav > li:hover >a
) or through id? I tried to create a class of my own for these changes but it had no effect. There is a 3rd color effect that is applied when clicking on a dropdown menu it applies a shade similar to the color of the:active
but it’s not,:active
only works while the mouse is pressed, test the dropdown of the example da doc. You will see that it applies a color while Meno is open.– Matheus Saraiva