Reputation: 95
So far it only responds to hover, no clue why it doesn't respond to active
Here is the fidddle http://jsfiddle.net/tP9E9/1/.
CSS:
.menu ul li button:hover {
background-color: rgba(206,0,0,1);
}
.menu ul li button:active {
background-color: rgba(206,0,0,1);
}
As you can probably guess, I have couple of divs with various content that open in response to button clicks. Hover works fine, but when div corresponding to button is opened (active) the button doesn't go red. Why is that?
Thanks
Upvotes: 0
Views: 63
Reputation: 310
Use
<input type="button" value="news">
and css
input:hover {
background-color: green;
}
input:active {
background-color: yellow;
}
You can also add :focus which will be available on Tab.
Upvotes: 3