[HTML/CSS] Remove 'gold' outline on form elements

Status
Not open for further replies.

Markshall

Русский Стандарт
Contributor
Dec 18, 2010
2,638
2,393
If you're running Google Chrome as a browser, you may notice that when you click on a form element such as a text box, select box or textarea field, a gold border will appear around the edge of the element, well I'm going to show you how to remove it.

It's a very simple piece of code but it does the job and the border really annoys me to be honest.

In your CSS file, simply enter this code:
PHP:
input:focus, select:focus, textarea:focus {
    outline: none;
}

Basically all this does is tells the browser not to add an outline on either an input, select or textarea field when you focus/click on them.

It's nothing much but I hope it helped.
Mark
 

Xenous

o shi
Nov 15, 2011
383
101
You can also change the color by doing
Code:
input:focus {
 
outline-color:<your color>;
}
Learn this ages ago ;)
 
Status
Not open for further replies.

Users who are viewing this thread

Top