Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dotted border appearing after link click

A dotted border appears around the hyperlink when clicked. I want to remove the dotted border appearing around the link (happens only in firefox). I have the following styles applied to anchor tag:

a, a:hover, a:link, a:active {
    text-decoration: none;
    color: #777777;
}

enter image description here

Link appears fine > click on the link > this box appears > goes off when clicked somewhere outside

URL: http://www.boxleak.in/ritgan

P.S.: Bootstrap is also included.

like image 489
Ankit Avatar asked Dec 05 '25 10:12

Ankit


2 Answers

Anchor links (<a>'s) by default have a dotted outline around them when they become "active" or "focused".

Try

a:hover, a:active, a:focus {
  outline: 0;
}

Read - https://css-tricks.com/removing-the-dotted-outline/

like image 86
Jinu Kurian Avatar answered Dec 09 '25 01:12

Jinu Kurian


Basically it's a default focus style for <a> tag. Using a:focus you can removed that border.

a:focus {
 outline: none;
}
like image 26
Kundan Sankhe Avatar answered Dec 09 '25 01:12

Kundan Sankhe