Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change focus glow of textarea in Bootstrap 3?

I want to change the blue glow if the focus on Bootstrap 3 input and textareas.

I tried adding this

textarea:focus, input:focus, input[type]:focus, .uneditable-input:focus {   
    border-color: rgba(229, 103, 23, 0.8);
    box-shadow: 0 1px 1px rgba(229, 103, 23, 0.075) inset, 0 0 8px rgba(229, 103, 23, 0.6);
    outline: 0 none;
}

to my costum.css but it only change the glow of input fields, not textarea. I also tried this,

.input:focus {
    outline: none !important;
    border:1px solid red;
    box-shadow: 0 0 10px #719ECE;
}

which changed nothing.

I am not a CSS savvy so appreciate your help.

like image 793
supermario Avatar asked Feb 18 '15 01:02

supermario


People also ask

How do I change the focus glow in Bootstrap?

By default, all the textual <input> elements, <textarea>, and <select> elements with the class .form-control highlighted in blue glow upon receiving the focus in Bootstrap. However, you can modify this default focus glow or shadow styles by simply setting the CSS border-color and box-shadow property.

How to set focus on input field or textarea inside bootstrap modal?

How to set focus on input field or textarea inside a Bootstrap modal on activation. Answer: Use the jQuery .focus() method. You can use the jQuery .focus() method to set focus on the first input box or textarea inside the Bootstrap modal when its load upon activation, like this: Example. $(this).find('#inputName').focus();

What is a bootstrap textarea?

A Bootstrap textarea is an input dedicated for a large volume of text. It may be used in a variety of components like forms, comment sections, and forums. Textareas don't have to be boring. They can be enhanced with colors, shadows or rounded corners.

How do I highlight the input element in Bootstrap 4?

Actually, in Bootstrap 4.0.0-Beta (as of October 2017) the input element isn't referenced by input [type="text"], all Bootstrap 4 properties for the input element are actually form based. So it's using the .form-control:focus styles. The appropriate code for the "on focus" highlighting of an input element is the following:


1 Answers

Try using:

textarea:focus, input:focus, .uneditable-input:focus {   
    border-color: rgba(229, 103, 23, 0.8) !important;
    box-shadow: 0 1px 1px rgba(229, 103, 23, 0.075) inset, 0 0 8px rgba(229, 103, 23, 0.6) !important;
    outline: 0 none !important;
}
like image 151
Drazzah Avatar answered Sep 17 '22 18:09

Drazzah