Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How come I can't remove the blue textarea border in Twitter Bootstrap?

Tags:

html

css

In Chrome, there is a blue border around the textarea.

How come I can't remove it?

textarea:hover, input:hover, textarea:active, input:active, textarea:focus, input:focus {         outline:0px !important;     } 
like image 363
user847495 Avatar asked Dec 24 '11 04:12

user847495


People also ask

How do I remove a blue outline in bootstrap?

If you're using Bootstrap 4, add box-shadow: none (and don't forgot the prefix -webkit-box-shadow: none ) to this answer. Also note that Bootstrap 4 already has . btn:focus { outline: none } in its btn classes.


2 Answers

You have write -webkit-appearance:none; like this:

textarea:hover,  input:hover,  textarea:active,  input:active,  textarea:focus,  input:focus, button:focus, button:active, button:hover, label:focus, .btn:active, .btn.active {     outline:0px !important;     -webkit-appearance:none;     box-shadow: none !important; } 
like image 169
sandeep Avatar answered Sep 23 '22 15:09

sandeep


Bootstrap 3

If you just want to change the color, change the variable (recommended):

Less or Customizer

@input-border-focus: red; 

variables.less

Sass

$input-border-focus: red; 

variables.sass

If you wan't to remove it completely, you'll have to overwrite the Mixin that sets the outline.

.form-control-focus(@color: @input-border-focus) {} 

CSS

If you are using css overwrite it via:

.form-control:focus{     border-color: #cccccc;     -webkit-box-shadow: none;     box-shadow: none; } 

Link to implementation

like image 41
HaNdTriX Avatar answered Sep 21 '22 15:09

HaNdTriX