CSS Code to Remove Border (Outline) Around Text / Input Boxes on Focus

This border is used to show that the element is focused (i.e. you can type in the input or click the button with Enter key).

You can remove it, though:

textarea:focus, input:focus {
    outline: none;

Chrome browser will also apply highlighting to other elements such as DIV's used as modals.

To prevent the highlight on those and all other elements as well, you can do:

*:focus {
    outline: none;


Popular posts from this blog

About 12 Alwars

Post thumbnails from external URLs don’t appear in Blogger. How to resolve?

What is the unicode character for the close symbol?