Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap .dropdown li background color

Here is my site: http://defend-foreclosure.com/index.html

I can't get the list items in the dropdown for "law" to change any color but blue when I hover over them. Can anyone tell me what element in the CSS I need to edit? I've been testing all sorts of elements in both bootstrap.css and bootstrap.min.css with no luck.

like image 840
PeerPressure Avatar asked Sep 19 '12 02:09

PeerPressure


2 Answers

Don't change bootstrap.css. Create another css file where you can override this. Anyway, the line is 4572:

.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a

Set background-image to none, and background-color to whatever color you want.

like image 52
martincho Avatar answered Nov 03 '22 19:11

martincho


If you also intend to change the color of a selected element, you should take care of the active class of the li element:

.dropdown-menu li.active > a,
.dropdown-menu li.active > a:hover,
.dropdown-menu li.active > a:focus {
    ...
}
like image 6
Saphired Avatar answered Nov 03 '22 20:11

Saphired