I am using the following code to toggle radio inputs:
<div class="btn-group">
<a href="#price" class="btn btn-primary btn-xs active" data-toggle="tab">
<input type="radio" name="price" id="price" value="1"> Price
</a>
<a href="#contact" class="btn btn-primary btn-xs active" data-toggle="tab">
<input type="radio" name="contact" id="contact" value="0"> Contact
</a>
</div>
When I click on the Contact button, the .active
class will be assigned to the Contact button. When I click the Price button, the class will be assigned to the Price button.
This works well. But I would like to change the color of the active button - now, both buttons are gray. But I would like to have the .active
button blue (primary) and the non-active
button gray (default).
How do I do that? Can I do it only with CSS?