Possible Duplicate:
How to remove border around text/input boxes? (Chrome)
Is there a way to disable the colored shadow generated by Webkit browsers when a form element receives focus? It's yellow in Chrome and blue in Safari, and gets in the way of any custom focus styles I try to implement.
Use the :focus pseudo-class with the "no-outline" class to style the form fields that are focused by the user. To have clear fields in your forms, set the outline property to its "none" value, which is used to display no outline.
To remove the focus on an input tag element in HTML, you can use the blur() method on the element using JavaScript. This input tag will be already focussed when a user visits the website and we want to remove the focus when we click the button below it.
Using the CSS rule :focus { outline: none; } to remove an outline on an object causes the link or control to be focusable, but removes any visible indication of focus for keyboard users. Methods to remove it such as onfocus="blur()" result in keyboard users being unable to interact with the link or control.
Try this:
input:focus {
outline: none;
}
You can try outline: none
but please note that this is generally not really desirable for usability reasons. Always keep Jakob Nielsen's "Law of the Web User Experience" in mind:
Users spend most of their time on other websites.
This means that they form their expectations for your site based on what's commonly done on most other sites. If you deviate, your site will be harder to use and users will leave.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With