0

I have an issue with my website where when I hold down a button, the button is outlined with blue. I have tried this code but it did not work:

button {
   outline: none !important;
}

and

button:focus {
   outline: none !important;
}

Either way, I do not want to use that code because apparently it is bad for website accessibility.

Is there a way to get rid of the blue outline?
Thanks.

yogurtsyum
  • 348
  • 1
  • 2
  • 17
  • 1
    Can you create a [Minimal, Reproducible Example](https://stackoverflow.com/help/minimal-reproducible-example) of what did you try? – SMAKSS May 16 '20 at 20:15
  • :focus {outline:none;} ::-moz-focus-inner {border:0;} https://stackoverflow.com/questions/71074/how-to-remove-firefoxs-dotted-outline-on-buttons-as-well-as-links?rq=1 – Gungnir May 16 '20 at 20:15
  • 2
    _"Either way, I do not want to use that code because apparently it is bad for website accessibility."_ Source? – j08691 May 16 '20 at 20:15
  • Are you using Bootstrap? – j08691 May 16 '20 at 20:16

1 Answers1

-1

Try this

button:focus{
outline: none;}

I have done if my own, if you still got some error then send me HTML

Hrithik Jaiswal
  • 74
  • 1
  • 2
  • 9