user3304303
user3304303

Reputation: 1041

Why won't background CSS color stay on hover?

On this dev site, if you hover of "BRANDS" in main menu, it brings up a dropdown. Hover over any of them and the background blinks red and then goes away.

I added background CSS to the "li" and "a" elements of the main menu like this...

.mega-dropdown-inner  ul.level1 li.open:hover{
background: red !important;
}
.mega-dropdown-inner  ul.level1 li a:hover{
background: red;
}

NOTE: I don't think I even need the "a" styling, but just tried it in case it helps.

Any idea why the background color won't stay the whole time you are hovering?

Upvotes: 0

Views: 100

Answers (1)

laaposto
laaposto

Reputation: 12213

Because of this rule

.t3-megamenu .mega-nav > li a:hover, .t3-megamenu .dropdown-menu .mega-nav > li a:hover, .t3-megamenu .mega-nav > li a:focus, .t3-megamenu .dropdown-menu .mega-nav > li a:focus {
   background-color: #002d5c !important; 
}

in your custom.css line 1031.

It is overriding your rule

Upvotes: 4

Related Questions