dropdown item coloring not working


Topic: dropdown item coloring not working

farahats9 asked 7 years ago

Hi,

I am using MDB 4.4 beta and I am trying a simple navbar dropdown example but the items change text color to white when hovering over them I tried the "dropdown-primary" class in the menu but still not working.
dropdown


Marta Szymanska staff pro premium answered 7 years ago

Hi,

we're sorry for this bug. Please try this code and add this to your style.css file or <style></style> tags:

.navbar .btn-group .dropdown-menu a:hover {
color: #000 !important;
}
.navbar .btn-group .dropdown-menu a:active {
color: #fff !important;
}

And also add class .btn-group to this part of html:

<li class="nav-item btn-group">
<a class="nav-link dropdown-toggle" id="navbarDropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a>
<div class="dropdown-menu dropdown-primary" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="#">Action</a>
<a class="dropdown-item" href="#">Another action</a>
<a class="dropdown-item" href="#">Something else here</a>
</div>
</li>

Best,

Marta


farahats9 commented 7 years ago

Thank you, this solved the problem.

Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue
  • User: Free
  • Premium support: No
  • Technology: MDB jQuery
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No