Reputation: 9332
I have a link (in fact a dropdown menu link) when clicked I have a dashed border around this link.
How can I avoid this behaviour?
Thanks.
Upvotes: 1
Views: 509
Reputation: 227
As an addendum to Chris's, answer (can't comment yet)
Make sure to also include
.yourclass:focus { outline: 0; }
to keep the outline from showing up on some corner cases where the focus remains on an element.
Upvotes: 0
Reputation: 26878
Use the CSS :focus
and :active
specifiers:
.yourclass:focus, .yourclass:active {
outline: 0; /*make sure no outline appears*/
}
And a little working demo: little link.
Hope this helped!
Upvotes: 7