Bootstrap btn class, but not hover state
I think the easiest thing to do would be to add some .nohover
class to the desired .btn
elements that would have the same styles as a .btn
class
HTML
<span class="btn nohover" style="background-color: #82CFFD"><strong>R</strong></span>
CSS
.btn.nohover:hover {
/* here copy default .btn class styles */
cursor:default !important;
/* or something like that */
}
If you set styles with the attribute style
, than this will top all styles set from a css file for the class .btn
. So you will not get a hover state style defined in bootstrap css.
And since boostrap 3 you have to set a css base class btn
and a modifier class btn-default
or btn-primary
or ...
The way to achieve what you want is to set your button style, something like btn-default
, and then add the active
class:
<span class="btn btn-default active" style="background-color: #82CFFD"><strong>R</strong></span>
The only caveat is that the button will always look "pressed." If you don't want the button to look pressed, you'll have to make a custom override.