90

I want to remove the Blue glow of the textbox and the border, but i don't know how to override any of the js or the css of it, check Here

EDIT 1

I want to do this because i am using the jquery plugin Tag-it and i am using twitter bootstrap also, the plugin uses a hidden textField to add the tags, but when i am using twitter bootstrap it appears as a textbox with glow inside a textbox which is a little bit odd

Fady Kamal
  • 1,302
  • 3
  • 13
  • 22
  • Do you have the ability to add a new class? If so just add a new class with `border:none; box-shadow:none;` – jeschafe Aug 30 '12 at 15:40
  • 1
    @jeschafe [Here](http://jsfiddle.net/fadykamal/pE5mQ/62/) ,and still nothing – Fady Kamal Aug 30 '12 at 15:41
  • this helped me: [bootstrap change color of input text border/outline][1] [1]: http://stackoverflow.com/questions/17097512/bootstrap-change-color-of-input-text-border-outline – change Jun 26 '13 at 21:27

12 Answers12

144
.simplebox {
  outline: none;
  border: none !important;
  -webkit-box-shadow: none !important;
  -moz-box-shadow: none !important;
  box-shadow: none !important;
}
laurent
  • 88,262
  • 77
  • 290
  • 428
jeschafe
  • 2,683
  • 1
  • 14
  • 13
29

You can also override the default Bootstrap setting to use your own colors

textarea:focus,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="datetime"]:focus,
input[type="datetime-local"]:focus,
input[type="date"]:focus,
input[type="month"]:focus,
input[type="time"]:focus,
input[type="week"]:focus,
input[type="number"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
input[type="search"]:focus,
input[type="tel"]:focus,
input[type="color"]:focus,
.uneditable-input:focus {
  border-color: rgba(82, 168, 236, 0.8);
  outline: 0;
  outline: thin dotted \9;
  /* IE6-9 */

  -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
  box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);
}
Hawkee
  • 2,027
  • 23
  • 20
11
input.simplebox:focus {
  border: solid 1px #ccc;
  box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
  transition: none;
  -moz-transition: none;
  -webkit-transition: none;
}

sets to bootstrap unfocused style

Austin Greco
  • 32,997
  • 6
  • 55
  • 59
8

if you think you can't handle the css class then simply add style to the textfield

<input type="text" style="outline:none; box-shadow:none;">
Dimgba Kalu
  • 143
  • 9
8

After doing some digging, I think they changed it in the latest bootstrap. The below code worked for me, its not simple box its form-control that I was using that was causing the issue.

input.form-control,input.form-control:focus {
    border:none;
    box-shadow: none;
   -webkit-box-shadow: none;
   -moz-box-shadow: none;
   -moz-transition: none;
   -webkit-transition: none;
}
cromination
  • 81
  • 1
  • 1
7

Go to Customize Bootstrap, look for @input-border-focus, enter your desired color code, scroll down and click "Compile and Download".

6

this will remove the border and the focus blue shadow.

input.simplebox,input.simplebox:focus {
  border:none;
  box-shadow: none;
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  -moz-transition: none;
  -webkit-transition: none;
}

http://jsfiddle.net/pE5mQ/64/

Glyn Jackson
  • 8,228
  • 4
  • 29
  • 52
4

On bootstrap 3 there is a small top shodow on ios, could be removed with this:

input[type="text"], input[type="email"], input[type="search"], input[type="password"] {
    -webkit-appearance: caret;
    -moz-appearance: caret; /* mobile firefox too! */
}

Got it from here

chris
  • 4,827
  • 6
  • 35
  • 53
2

Vendor prefixes aren't necessary at this point, unless you're supporting legacy browsers, and you could simplify your selectors by just referring to all inputs rather than each of the individual types.

input:focus,
textarea:focus,
select:focus {
  outline: 0;
  box-shadow: none;
}
bert
  • 3,989
  • 4
  • 16
  • 32
Melanie Ceraso
  • 509
  • 5
  • 6
0

HTML

<input type="text" class="form-control shadow-none">

CSS

input:focus{
    border: 1px solid #ccc
}
Savan Padaliya
  • 828
  • 1
  • 11
  • 22
0
.form-control:focus {
  box-shadow: 0 0 0 0.2rem rgba(103, 250, 34, 0.25);
}
Pradip Kachhadiya
  • 2,067
  • 10
  • 28
0

So far none of the answers helped me out in this thread. What solved it for me was

/*Shadow after focus - Overwrites bootstrap5 style for btn classes*/
.btn-check:focus + .btn-primary, 
.btn-primary:focus {
    box-shadow: 0 0 7px 7px rgba(4,220,93,255);
}
/*Shadow while clicking (Animation) - Overwrites bootstrap5 style for btn classes*/
.btn-check:active + .btn-primary:focus, 
.btn-check:checked + .btn-primary:focus, 
.btn-primary.active:focus, 
.btn-primary:active:focus, 
.show > .btn-primary.dropdown-toggle:focus {
    box-shadow: 0 0 0 .25rem rgba(10, 102, 37, 0.493);
}
Mbotet
  • 170
  • 2
  • 17