Home > OS >  Change background color in Bootstrap 5 multi level dropdown menu
Change background color in Bootstrap 5 multi level dropdown menu

Time:05-04

anyone tried to changed the background color in multi-dropdown menu in bootstrap 5? the original code is here https://bootstrap-menu.com/demos/multilevel.html

I want to change the background color in visited/active in multi level the code below doesn't work

.dropdown-menu>.active>a, 
.dropdown-menu>.active>a:visited, 
.dropdown menu>.active>a:hover,  
.dropdown-menu>.active>a:focus { 
background-color: #222222!important;  
}

Sample

CodePudding user response:

By default bootstrap provide class to change dropdown menu color to dark by aading class ".dropdown-menu-dark" to dropdown-menu.

Hope that work for you

  • Related