So I have code like
<button id="create_btn" class="btn" type="button" title="List Available Games">List Games</button>
and I want to have the color always be white, even after visited. My CSS looks like:
.btn {
border-radius: 0px;
color: white;
display: inline-block;
}
.btn:hover {
color: white;
}
#create_btn {
background-color: firebrick;
width: 120px;
height: 42px;
}
but I don't know how to make the color stay white when I click it, even though it currently does nothing (in the application, it's going to create or list the games on a table below without refreshing, so what should I do? I tried .btn:visited { color: white;}
but that doesn't work, also tried adding <a></a>
around it and changing the a:visited
but the text still is black when clicked.
I'm not even sure if it's the 'visited' concept, because when I click the button, I haven't added the JS functionality for it to do anything yet, so it just sits there loading until I click somewhere else. While it's 'loading' after clicked, it's black, and I'd like it to stay white.
It seems that your CSS gets overwritten. Please use FireBug (http://getfirebug.com/enable) and check the class/id for overrides
https://jsfiddle.net/z7h0kc79/ - seems fine.