So I've been trying a whole bunch of things to change the color of my buttons in a bootstrap website. I've tried creating a class in the css and changing the background color there. I've tried using ids to change the background color, I've tried overriding .btn-primary, but that changes all of the buttons. I have more than 6 buttons to make more than 6 button colors, so I need to be able to do it without using the 6 existing button types. Does anyone know how I could do this?
The HTML:
<form action="index.html">
<button type="submit" class="btn btn-primary btn-lg btn-block home" id="home">
Home <span class="glyphicon glyphicon-home"></span>
</button>
</form>
The CSS:
.home{
background-color:#9b59b6;
}
Edit: Thank you all for your responses. They were all correct. However none of them fixed the issue. You know what did? Removing a lone / character that had somehow found its way into my code. Lesson learned: Check your code for other errors before blaming bootstrap and css.