tags:

views:

25

answers:

2

i want to change the color of a button on hover, when a user goes over it.

this is my solution, but it deosnt work

a.button {
   display: -moz-inline-stack;
   display: inline-block;
   width: 391px;
   height: 62px;
   background: url("img/btncolor.png") no-repeat;
   line-height: 62px;
   vertical-align: text-middle;
   text-align: center;
   color: #ebe6eb;
   font-family: Zenhei;
   font-size: 39px;
   font-weight: normal;
   font-style: normal;
   text-shadow: #222222 1px 1px 0;
}
a.button a:hover{
     background: #383;
}
+3  A: 

a.button a:hover means "a link that's being hovered over that is a child of a link with the class button".

Go instead for a.button:hover.

Matchu
cheers it works
getaway
you should probably mark this as the accepted answer if it answers the question
Jonathan Fingland
@Jonathan Fingland: I think StackOverflow doesn't allow one to accept an answer until a certain interval has passed. Don't quite remember what it is, though.
Matchu
lol yeh i know, but it wnt let after 10 minutes :))
getaway
my apologies. I didn't realize the limit was that long now. maybe based on reputation?
Jonathan Fingland
A: 

Seems your selector is wrong, try using:

a.button:hover{
     background: #383;
}

Your code

a.button a:hover

Means it is going to search for an a element inside a with class button.

BrunoLM