1
<input type="button" id="AutoRefresh" value="Auto Refresh" onclick="toggleRefresh();"/>

Before Click:

Before Click

After Click:

After Click

How to prevent the button from being visually selected?

tom
  • 1,302
  • 1
  • 16
  • 30

1 Answers1

0

Something like..

/* Outline due to focus */
input[type="button"]:focus {
    outline: none !important;   
}

or..

/* Any outlines applied */
#AutoRefresh { 
    outline: none !important;
}

..in your CSS file / <style> tag, or whatever method of styling you apply.

For Firefox:

input[type="button"]::-moz-focus-inner {   
    border : 0px;
} 
Algernop K.
  • 477
  • 2
  • 19
  • Actually I have tried `input[type="button"]:active:focus { outline: none; }` But doesn't work. – tom May 10 '16 at 01:26
  • Is it browser specific? Seen solutions like `#myButton:-moz-focusring { outline: 0px; }` being thrown out there – Algernop K. May 10 '16 at 01:33
  • See [this post](http://stackoverflow.com/questions/71074/how-to-remove-firefoxs-dotted-outline-on-buttons-as-well-as-links) for instance – Algernop K. May 10 '16 at 01:33