By clicking inside the input field or focus on the input field, how to change the border color.
HTML
<div className="col-md-12">
<div className="form-group">
<label for="Street_Address">Street address</label>
<input type="text" className="form-control" id="Street_Address" placeholder="" />
</div>
</div>
CSS
input:focus
{
border: 1px solid #1670BE;
box-shadow: 0 0 3px #1670BE;
outline-offset: 0px;
outline: none;
}
Change the border colorOn the Drawing Tools Format tab, click Shape Outline and, under Theme Colors, pick the color you want. Select the shape or text box.
Try this:
input[type="text"], input[type="password"], textarea, select {
outline: none;
}
When the element is focussed, the User Agent (browser) by default sets an outline. So, to prevent it, you need to override it as shown above
try this also.
*:focus {
outline: none;
}
Sometimes what looks like a border is really a border shadow as in the case of Bootstrap, so you would use:
#myelement:focus {
box-shadow: none;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With