I have this code at the moment (following on from earliers question):
input[type=submit]:focus {
background-color: yellow;
outline: none;
}
The problem however, is when I click anywhere else on the screen, the background colour reverts to normal. How can I get it to stay and only change if I click another button? also a further question, how can I get one particular one to default to a colour when the page loads? at the moment all the colours are black background until you click one, that turns it yellow and then clicking anywhere else on the page, turns that one back to black
pure JS solutions only please