7

I have recently started building a website and have started to make buttons on it. However, whenever I click the button, I get a blue border like this !

How should I get rid of this border? Thanks in advance!

Sam Bates
  • 2,807
  • 3
  • 13
  • 6
  • possible duplicate of [how to remove dotted border around link](http://stackoverflow.com/questions/12007507/how-to-remove-dotted-border-around-link) – Quentin Mar 16 '14 at 10:05

4 Answers4

12

Add this css to your button:

outline: none;
Hardy
  • 5,590
  • 2
  • 18
  • 27
5

Just add :

button:focus {
    outline: none;
}
Sanjeev
  • 855
  • 1
  • 9
  • 15
3

The way to remove this is to add this to the css of the button:

outline: 0;

If you don't want that line anywhere add this to your css:

* {
    outline: 0;
}
Hive7
  • 3,599
  • 2
  • 22
  • 38
0

just add outline: none;

here's an example

#button
{
  width: 10px;
  height: 10px;
  z-index: -1;
  outline: none;
}
slfan
  • 8,950
  • 115
  • 65
  • 78
japha
  • 1