look at this fiddle JS FIDDLE
When i hover(:hover) background changes but when clicked (:active) box-shadow is not changed dont know why ? This does not happen if another button does not change background on hover !
in this fiddle i want somehthing like combination of button 1 and button 2
.white-button {
background: #FFF;
font-weight: normal;
color: #3b3b3b;
border: 1px solid #DDD;
box-shadow: 0 0 2px #ccc;
font-family: MV boli,Tahoma;
margin: 5px;
padding: 5px 10px 5px 10px;
font-size: 15px;
}
.positive:enabled:hover {
background: #99CD30;
box-shadow: inset 2px -7px 11px rgba(80, 92, 51, 0.17)!important;
}
button:active {
border-bottom-color: #999;
box-shadow: inset 0 3px 3px rgba(0, 0, 0, .2);
}
.gray-button{
background:#eee;
padding:5px 10px;
border: 1px solid #999;
border-bottom-color: #888;
}
For those who cant under stand!
As you see there are 3 buttons on fiddle with name like lets say then button A,B and C respectively.
- Now when i hover
Ai get a green background with an inset box-shadow . - When i hover
Bi get a green background with no inset shadow When i hover
Ci get nothingWhen i click
Ait remains same- when i click
Ban inset shadow is created - when i click
Can an inset shadow is created
Now the button i want is D i want
- when i hover
Di get a i get a green background with an inset
box-shadow . when i click
Dan another inset shadow is created replacing previous one.but that does not happen dont know why ?