728x90 AdSpace

Latest News
Wednesday, November 9, 2016

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 press the button with Enter).

You can remove it, though:

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

Chrome 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;
}

  • Blogger Comments
  • Facebook Comments

0 comments:

Post a Comment

Item Reviewed: CSS code to remove border (outline) around text/input boxes on focus Rating: 5 Reviewed By: Thiruvikraman Govindarajan