Bronzato
Bronzato

Reputation: 9332

Avoid dashed border around clicked link

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?

enter image description here

Thanks.

Upvotes: 1

Views: 509

Answers (2)

Andrew Martin
Andrew Martin

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

Chris
Chris

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

Related Questions