When Dropdown is opened - I want to change default color of it. I want to change border color and background using css.
Here is html code:
<div class="row menu">
<ul class="nav nav-pills pull-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle"
data-toggle="dropdown">
My reports
<span class="caret my-reports-caret"></span>
</a>
<ul class="dropdown-menu">
<li><%= link_to "Performance", performance_reports_path %></li>
<li class="divider"></li>
<li><%= link_to "Account settings", '#' %></li>
</ul>
</li>
</ul>
</div>
My css,that I tried:
.menu .nav-pills .dropdown .open .dropdown-toggle{
background-color: red;
}
Where is problem in my selectors ?
Use this class if you are using the latest version of Bootstrap.
It solve my problem, maybe it will help you.
This work for me:
sample: http://wp.rstecinfo.com.br/wp-content/uploads/2018/08/nav-pills.png
Here is your problem:
http://jsfiddle.net/userdude/mjbN7/
.open
doesn't exist in the element chain.And here is your fiddle with the border (which had both the
.open
and noborder-style
orborder-width
to style):http://jsfiddle.net/userdude/bdCMU/4/
This worked for me, too: