Reputation: 701
I have this:
.some-button: focus {
background-color: red;
border: none;
}
But still when I click on it, it does turn red, but there is still a visible border. Is there something I'm missing that's applying the border?
Upvotes: 0
Views: 1678
Reputation: 1659
You just need to remove the space before focus
and add outline: none
.
.some-button:focus {
background-color: red;
border: none;
outline: none;
}
<button class="some-button">Some Button</button>
Upvotes: 3
Reputation: 10193
When focusing an element, outline
style is set globally so you need to update the value of outline
too.
And also remove the space before focus
.
.some-button:focus {
background-color: red;
border: none;
outline: none;
}
Upvotes: 1
Reputation: 955
Maybe, this is what do you want:
.some-button:focus {
background-color: red;
border: none;
outline: none;
}
Upvotes: 1