css - Bootstrap's "dropdown open" background color -


i'm trying change background color of li element when it's class changes "dropdown" "dropdown open" on click. i've managed change color of text (which a). can't change parent li properties.

i've copied code here: http://www.bootply.com/fk88owgjgl. @ end of css file you'll see i've managed code concerning background color of li , of it's child. can't understand why font color works , background doesn't.

any appreciated.

thanks time

i think problem related floating elements inside form, adding clear fix help.

.navbar-right .dropdown-menu form:after {     content: "";     display: table;     clear: both; } 

and there bit background @ bottom due parent margin, can rest.

.navbar-right {     margin-bottom: 0; } 

use below, if need change background of search item itself(with magnifying glass) when active.

li.dropdown.open > a:focus {   color: #000;   background: red; } 

demo: http://jsfiddle.net/1ub60vcj/3/


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -