Im using bootstrap button, then i changed the color of the button. but when i clicked the button it change to blue, even though i write .btn-primary:active
HTML:
<button type="button" class="btn btn-primary">My Button</button>
CSS:
.btn-primary {
background-color: #ffa500;
border: 1px solid #e39400;
}
.btn-primary:hover {
background-color: #e39400;
border: 1px solid #e39400;
}
.btn-primary:active {
background-color: #e39400;
border: 1px solid #e39400;
}
2
Answers
If you want to override the default for Bootstrap, you can change
.btn-primary:active
to:use
!imporant
and it should work