29

How can I remove the border around an <input type="text"> and make its background transparent?

Ry-
  • 218,210
  • 55
  • 464
  • 476
Tree
  • 9,532
  • 24
  • 64
  • 83

4 Answers4

53

Try this:

border: none;
border-color: transparent;
Ry-
  • 218,210
  • 55
  • 464
  • 476
Haim Evgi
  • 123,187
  • 45
  • 217
  • 223
22
border: none transparent;
outline: none;

This will not only remove the border around the input field but also the orange highlight when the input is in focus.

Sachin
  • 3,350
  • 2
  • 17
  • 29
  • 1
    +1 outline:none makes the border disappear even when the input is focused. Otherwise, border:none is not enough. – Vlad Mar 22 '18 at 05:30
17

Like this:

input {
    border: none;
    background: transparent;
}
Ry-
  • 218,210
  • 55
  • 464
  • 476
SLaks
  • 868,454
  • 176
  • 1,908
  • 1,964
1

Better late than never:

input {border-style:none;}
user1032531
  • 24,767
  • 68
  • 217
  • 387