Home > OS >  How would I make the input border invisible?
How would I make the input border invisible?

Time:01-18

I'm making a form, but I want the input field borders invisible. Is this possible? I've tried <input type="text" style="display:none"> but that doesn't do anything. It just makes the whole input invisible and not input-able (?).

CodePudding user response:

If you don't want a border just put border: none but if you don't want a border when focusing the input put outline: none

PS : As F. Müller said in the comments of the post, from the point of view of accessibility you should not disable the outlines.

Example :

input {
  border: none;
  outline: none;
}
<input type="text" placeholder="myinput">

CodePudding user response:

you your css file/codes just put the below line for achieve that objective

input { outline : none }

CodePudding user response:

You can use border: 0; to remove the border of the input. You can also use outline: 0; to remove the outline on the focus.

Example:

input{
  border:0;
}

input:focus{
  outline:0;
}
  •  Tags:  
  • Related